@aeriajs/types 0.0.6 → 0.0.8
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/contract.d.ts +1 -0
- package/dist/contract.js +5 -0
- package/dist/contract.mjs +3 -1
- package/dist/functions.d.ts +1 -1
- package/package.json +1 -1
package/dist/contract.d.ts
CHANGED
|
@@ -15,3 +15,4 @@ export type Contract = {
|
|
|
15
15
|
};
|
|
16
16
|
export type ContractWithRoles = ContractRoles & Contract;
|
|
17
17
|
export type ContractToFunction<TContract extends Contract | ContractWithRoles, ContextParameter = Context> = ('payload' extends keyof TContract ? InferProperty<TContract['payload']> : undefined) extends infer Payload ? ('response' extends keyof TContract ? InferProperty<TContract['response']> : any) extends infer Response ? Payload extends undefined ? (payload: Payload | undefined, context: ContextParameter) => Response : (payload: Payload, context: ContextParameter) => Response : never : never;
|
|
18
|
+
export declare const defineContract: <const TContractWithRoles extends ContractWithRoles>(contract: TContractWithRoles) => TContractWithRoles;
|
package/dist/contract.js
CHANGED
package/dist/contract.mjs
CHANGED
package/dist/functions.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type StrictFilterOperators<TDocument> = FilterOperators<TDocument> extend
|
|
|
14
14
|
[P in keyof InferredFilters as 0 extends (InferredFilters[P] & 1) ? never : P]: InferredFilters[P];
|
|
15
15
|
} : never;
|
|
16
16
|
export type Filters<TDocument> = Partial<{
|
|
17
|
-
[P in keyof TDocument]: TDocument[P] | StrictFilterOperators<TDocument[P]>;
|
|
17
|
+
[P in keyof TDocument]: PackReferences<TDocument>[P] | StrictFilterOperators<PackReferences<TDocument>[P]>;
|
|
18
18
|
}>;
|
|
19
19
|
export type What<TDocument> = StrictUpdateFilter<TDocument> & {
|
|
20
20
|
[P in keyof TDocument]?: '_id' extends keyof TDocument[P] ? TDocument[P] | string : TDocument[P];
|