pqb 0.4.2 → 0.4.3
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 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/relations.ts +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -142,16 +142,16 @@ declare type RelationQueryBase = Query & {
|
|
|
142
142
|
[relationQueryKey]: string;
|
|
143
143
|
[isRequiredRelationKey]: boolean;
|
|
144
144
|
};
|
|
145
|
-
declare type PrepareRelationQuery<T extends Query, RelationName extends PropertyKey, Required extends boolean> = Omit<T, 'tableAlias'> & {
|
|
145
|
+
declare type PrepareRelationQuery<T extends Query, RelationName extends PropertyKey, Required extends boolean, Populate extends string> = Omit<T, 'tableAlias'> & {
|
|
146
146
|
tableAlias: RelationName extends string ? RelationName : never;
|
|
147
147
|
[isRequiredRelationKey]: Required;
|
|
148
148
|
[relationQueryKey]: string;
|
|
149
|
+
} & {
|
|
150
|
+
[defaultsKey]: Record<Populate, true>;
|
|
149
151
|
};
|
|
150
|
-
declare type RelationQuery<Name extends PropertyKey = string, Params extends Record<string, unknown> = never, Populate extends string = never, T extends Query = Query, Required extends boolean = boolean, ChainedCreate extends boolean = false, Q extends RelationQueryBase = ChainedCreate extends true ? PrepareRelationQuery<T, Name, Required> : PrepareRelationQuery<T, Name, Required> & {
|
|
152
|
+
declare type RelationQuery<Name extends PropertyKey = string, Params extends Record<string, unknown> = never, Populate extends string = never, T extends Query = Query, Required extends boolean = boolean, ChainedCreate extends boolean = false, Q extends RelationQueryBase = ChainedCreate extends true ? PrepareRelationQuery<T, Name, Required, Populate> : PrepareRelationQuery<T, Name, Required, Populate> & {
|
|
151
153
|
[K in CreateMethodsNames]: never;
|
|
152
|
-
}> = ((params: Params) => Q &
|
|
153
|
-
[defaultsKey]: Record<Populate, true>;
|
|
154
|
-
}) & Q;
|
|
154
|
+
}> = ((params: Params) => Q) & Q;
|
|
155
155
|
|
|
156
156
|
interface QueryResultRow {
|
|
157
157
|
[column: string]: any;
|