Skip to content

Commit

Permalink
fix: added ts-ignore to supress warnings when the type is not used
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfiorette committed Jun 20, 2023
1 parent 44d6f93 commit 7c01c36
Showing 1 changed file with 121 additions and 94 deletions.
215 changes: 121 additions & 94 deletions src/helpers/namespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ declare global {
namespace ${nsName} {}
}
/**
* A filter to be used against nullable List types.
*/
/** A filter to be used against nullable List types. */
export type NullableListFilter<T> = {
equals?: T | T[] | null;
has?: T | null;
Expand All @@ -16,18 +14,14 @@ export type NullableListFilter<T> = {
isEmpty?: boolean;
};
/**
* A type to determine how to update a json field
*/
/** A type to determine how to update a json field */
export type UpdateInput<T> = T extends object
? {
[P in keyof T]?: UpdateInput<T[P]>;
}
: T;
/**
* A type to determine how to update a json[] field
*/
/** A type to determine how to update a json[] field */
export type UpdateManyInput<T> =
| T
| T[]
Expand All @@ -36,9 +30,7 @@ export type UpdateManyInput<T> =
push?: T | T[];
};
/**
* A type to determine how to create a json[] input
*/
/** A type to determine how to create a json[] input */
export type CreateManyInput<T> =
| T
| T[]
Expand All @@ -47,123 +39,158 @@ export type CreateManyInput<T> =
};
/**
* A typed version of NestedStringFilter, allowing narrowing of string types to discriminated unions.
*/
export type TypedNestedStringFilter<S extends string> = Prisma.StringFilter & {
equals?: S;
in?: S | S[];
notIn?: S | S[];
not: TypedNestedStringFilter<S> | S
}
* A typed version of NestedStringFilter, allowing narrowing of string types to
* discriminated unions.
*/
export type TypedNestedStringFilter<S extends string> =
//@ts-ignore - When Prisma.StringFilter is not present, this type is not used
Prisma.StringFilter & {
equals?: S;
in?: S | S[];
notIn?: S | S[];
not: TypedNestedStringFilter<S> | S;
};
/**
* A typed version of StringFilter, allowing narrowing of string types to discriminated unions.
* A typed version of StringFilter, allowing narrowing of string types to discriminated
* unions.
*/
export type TypedStringFilter<S extends string> = Prisma.StringFilter & {
equals?: S;
in?: S | S[];
notIn?: S | S[];
not: TypedNestedStringFilter<S> | S
}
export type TypedStringFilter<S extends string> =
//@ts-ignore - When Prisma.StringFilter is not present, this type is not used
Prisma.StringFilter & {
equals?: S;
in?: S | S[];
notIn?: S | S[];
not: TypedNestedStringFilter<S> | S;
};
/**
* A typed version of NestedStringNullableFilter, allowing narrowing of string types to discriminated unions.
* A typed version of NestedStringNullableFilter, allowing narrowing of string types to
* discriminated unions.
*/
export type TypedNestedStringNullableFilter<S extends string> = Prisma.StringNullableFilter & {
equals?: S | null;
in?: S | S[] | null;
notIn?: S | S[] | null;
not: TypedNestedStringNullableFilter<S> | S | null
}
export type TypedNestedStringNullableFilter<S extends string> =
//@ts-ignore - When Prisma.StringNullableFilter is not present, this type is not used
Prisma.StringNullableFilter & {
equals?: S | null;
in?: S | S[] | null;
notIn?: S | S[] | null;
not: TypedNestedStringNullableFilter<S> | S | null;
};
/**
* A typed version of StringNullableFilter, allowing narrowing of string types to discriminated unions.
* A typed version of StringNullableFilter, allowing narrowing of string types to
* discriminated unions.
*/
export type TypedStringNullableFilter<S extends string> = Prisma.StringNullableFilter & {
equals?: S | null;
in?: S | S[] | null;
notIn?: S | S[] | null;
not: TypedNestedStringNullableFilter<S> | S | null
}
export type TypedStringNullableFilter<S extends string> =
//@ts-ignore - When Prisma.StringNullableFilter is not present, this type is not used
Prisma.StringNullableFilter & {
equals?: S | null;
in?: S | S[] | null;
notIn?: S | S[] | null;
not: TypedNestedStringNullableFilter<S> | S | null;
};
/**
* A typed version of NestedStringWithAggregatesFilter, allowing narrowing of string types to discriminated unions.
* A typed version of NestedStringWithAggregatesFilter, allowing narrowing of string types
* to discriminated unions.
*/
export type TypedNestedStringWithAggregatesFilter<S extends string> = Prisma.NestedStringWithAggregatesFilter & {
equals?: S;
in?: S | S[];
notIn?: S | S[];
not: TypedNestedStringWithAggregatesFilter<S> | S
}
export type TypedNestedStringWithAggregatesFilter<S extends string> =
//@ts-ignore - When Prisma.NestedStringWithAggregatesFilter is not present, this type is not used
Prisma.NestedStringWithAggregatesFilter & {
equals?: S;
in?: S | S[];
notIn?: S | S[];
not: TypedNestedStringWithAggregatesFilter<S> | S;
};
/**
* A typed version of StringWithAggregatesFilter, allowing narrowing of string types to discriminated unions.
* A typed version of StringWithAggregatesFilter, allowing narrowing of string types to
* discriminated unions.
*/
export type TypedStringWithAggregatesFilter<S extends string> = Prisma.StringWithAggregatesFilter & {
equals?: S;
in?: S | S[];
notIn?: S | S[];
not?: TypedNestedStringWithAggregatesFilter<S> | S
}
export type TypedStringWithAggregatesFilter<S extends string> =
//@ts-ignore - When Prisma.StringWithAggregatesFilter is not present, this type is not used
Prisma.StringWithAggregatesFilter & {
equals?: S;
in?: S | S[];
notIn?: S | S[];
not?: TypedNestedStringWithAggregatesFilter<S> | S;
};
/**
* A typed version of NestedStringNullableWithAggregatesFilter, allowing narrowing of string types to discriminated unions.
* A typed version of NestedStringNullableWithAggregatesFilter, allowing narrowing of
* string types to discriminated unions.
*/
export type TypedNestedStringNullableWithAggregatesFilter<S extends string> = Prisma.NestedStringNullableWithAggregatesFilter & {
equals?: S | null;
in?: S | S[] | null;
notIn?: S | S[] | null;
not: TypedNestedStringNullableWithAggregatesFilter<S> | S | null
}
export type TypedNestedStringNullableWithAggregatesFilter<S extends string> =
//@ts-ignore - When Prisma.NestedStringNullableWithAggregatesFilter is not present, this type is not used
Prisma.NestedStringNullableWithAggregatesFilter & {
equals?: S | null;
in?: S | S[] | null;
notIn?: S | S[] | null;
not: TypedNestedStringNullableWithAggregatesFilter<S> | S | null;
};
/**
* A typed version of StringNullableWithAggregatesFilter, allowing narrowing of string types to discriminated unions.
* A typed version of StringNullableWithAggregatesFilter, allowing narrowing of string
* types to discriminated unions.
*/
export type TypedStringNullableWithAggregatesFilter<S extends string> = Prisma.StringNullableWithAggregatesFilter & {
equals?: S | null;
in?: S | S[] | null;
notIn?: S | S[] | null;
not?: TypedNestedStringNullableWithAggregatesFilter<S> | S | null
}
export type TypedStringNullableWithAggregatesFilter<S extends string> =
//@ts-ignore - When Prisma.StringNullableWithAggregatesFilter is not present, this type is not used
Prisma.StringNullableWithAggregatesFilter & {
equals?: S | null;
in?: S | S[] | null;
notIn?: S | S[] | null;
not?: TypedNestedStringNullableWithAggregatesFilter<S> | S | null;
};
/**
* A typed version of StringFieldUpdateOperationsInput, allowing narrowing of string types to discriminated unions.
/**
* A typed version of StringFieldUpdateOperationsInput, allowing narrowing of string types
* to discriminated unions.
*/
export type TypedStringFieldUpdateOperationsInput<S extends string> = Prisma.StringFieldUpdateOperationsInput & {
set?: S
}
export type TypedStringFieldUpdateOperationsInput<S extends string> =
//@ts-ignore - When Prisma.StringFieldUpdateOperationsInput is not present, this type is not used
Prisma.StringFieldUpdateOperationsInput & {
set?: S;
};
/**
* A typed version of NullableStringFieldUpdateOperationsInput, allowing narrowing of string types to discriminated unions.
*/
export type TypedNullableStringFieldUpdateOperationsInput<S extends string> = Prisma.NullableStringFieldUpdateOperationsInput & {
set?: S | null
}
* A typed version of NullableStringFieldUpdateOperationsInput, allowing narrowing of
* string types to discriminated unions.
*/
export type TypedNullableStringFieldUpdateOperationsInput<S extends string> =
//@ts-ignore - When Prisma.NullableStringFieldUpdateOperationsInput is not present, this type is not used
Prisma.NullableStringFieldUpdateOperationsInput & {
set?: S | null;
};
/**
* A typed version of StringNullableListFilter, allowing narrowing of string types to discriminated unions.
* A typed version of StringNullableListFilter, allowing narrowing of string types to
* discriminated unions.
*/
export type TypedStringNullableListFilter<S extends string> = Prisma.StringNullableListFilter & {
equals?: S | S[] | null
has?: S | null
hasEvery?: S | S[]
hasSome?: S | S[]
}
export type TypedStringNullableListFilter<S extends string> =
//@ts-ignore - When Prisma.StringNullableListFilter is not present, this type is not used
Prisma.StringNullableListFilter & {
equals?: S | S[] | null;
has?: S | null;
hasEvery?: S | S[];
hasSome?: S | S[];
};
/**
* A typed version of the input type to update a string[] field, allowing narrowing of string types to discriminated unions.
* A typed version of the input type to update a string[] field, allowing narrowing of
* string types to discriminated unions.
*/
export type UpdateStringArrayInput<S extends string> = {
set?: S | S[]
push?: S | S[]
}
set?: S | S[];
push?: S | S[];
};
/**
* A typed version of the input type to create a string[] field, allowing narrowing of string types to discriminated unions.
* A typed version of the input type to create a string[] field, allowing narrowing of
* string types to discriminated unions.
*/
export type CreateStringArrayInput<S extends string> = {
set?: S | S[]
}
set?: S | S[];
};
`.trim();
}

0 comments on commit 7c01c36

Please sign in to comment.