rads-db 3.0.55 → 3.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +5 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -59,8 +59,12 @@ interface GetManyResponse<EN extends keyof EntityMeta, A extends GetArgs<EN, any
|
|
|
59
59
|
type GetResponse<EN extends keyof EntityMeta, A extends GetArgs<EN, any>> = A extends {
|
|
60
60
|
include: any;
|
|
61
61
|
} ? GetResponseInclude<EN, A['include']> : GetResponseNoInclude<EN>;
|
|
62
|
-
type Get<EntityName extends keyof EntityMeta, Include extends
|
|
62
|
+
type Get<EntityName extends keyof EntityMeta, Include extends keyof EntityMeta[EntityName]['relations'] | GetArgsInclude<EntityName> = {}> = Include extends GetArgsInclude<EntityName> ? GetResponse<EntityName, {
|
|
63
63
|
include: Include;
|
|
64
|
+
}> : GetResponse<EntityName, {
|
|
65
|
+
include: {
|
|
66
|
+
[K in Include]: {};
|
|
67
|
+
};
|
|
64
68
|
}>;
|
|
65
69
|
type RelationData<EN extends keyof EntityMeta, K extends keyof EntityMeta[EN]['relations']> = Pick<EntityMeta[EN]['relations'][K]['entity'], EntityMeta[EN]['relations'][K]['denormFields']>;
|
|
66
70
|
type KeepArray<TMaybeArray, TType> = NonNullable<TMaybeArray> extends any[] ? TType[] : TType;
|