@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.
@@ -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
@@ -1,2 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defineContract = void 0;
4
+ const defineContract = (contract) => {
5
+ return contract;
6
+ };
7
+ exports.defineContract = defineContract;
package/dist/contract.mjs CHANGED
@@ -1 +1,3 @@
1
- export { };
1
+ export var defineContract = function(contract) {
2
+ return contract;
3
+ };
@@ -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];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/types",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",