We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
RelationCheck
1 parent 9ed78db commit d5c1ea7Copy full SHA for d5c1ea7
libs/json-api/json-api-nestjs-shared/src/lib/types/entity-type.ts
@@ -13,8 +13,8 @@ export type CastIteratorType<T> = T extends {
13
type RelationCheck<T, IdKey extends string> = T extends never
14
? 0
15
: T extends Promise<infer U>
16
- ? HasId<U, IdKey>
17
- : HasId<CastIteratorType<T>, IdKey>;
+ ? RelationCheck<U, IdKey>
+ : HasId<Exclude<CastIteratorType<T>, undefined>, IdKey>;
18
19
export type RelationKeys<E, IdKey extends string = 'id'> = {
20
[K in keyof E]: Exclude<E[K], null> extends never
0 commit comments