@aeriajs/types 0.0.116 → 0.0.117

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.
Files changed (2) hide show
  1. package/dist/schema.d.ts +2 -2
  2. package/package.json +1 -1
package/dist/schema.d.ts CHANGED
@@ -55,13 +55,13 @@ export type Schema<TSchema, TSchemaOptions extends SchemaOptions = {}> = CaseTim
55
55
  export type SchemaWithId<TSchema, TSchemaOptions extends SchemaOptions = {}> = Schema<TSchema, TSchemaOptions> & {
56
56
  _id: ObjectId;
57
57
  };
58
- export type InferProperties<TSchema> = TSchema extends readonly unknown[] ? TSchema extends readonly (infer SchemaOption)[] ? SchemaOption extends unknown ? SchemaOption extends {
58
+ export type InferProperties<TSchema> = (TSchema extends readonly unknown[] ? TSchema extends readonly (infer SchemaOption)[] ? SchemaOption extends unknown ? SchemaOption : never : never : TSchema) extends infer InferredSchema ? InferredSchema extends {
59
59
  $ref: infer K;
60
60
  } | {
61
61
  items: {
62
62
  $ref: infer K;
63
63
  };
64
- } ? K extends keyof Collections ? 'items' extends keyof SchemaOption ? Collections[K]['item'][] : Collections[K]['item'] : never : InferProperty<SchemaOption> : never : never : InferProperty<TSchema>;
64
+ } ? K extends keyof Collections ? 'items' extends keyof InferredSchema ? Collections[K]['item'][] : Collections[K]['item'] : never : InferProperty<InferredSchema> : never;
65
65
  export type PackReferences<T> = {
66
66
  [P in keyof T]: PackReferencesAux<T[P]>;
67
67
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/types",
3
- "version": "0.0.116",
3
+ "version": "0.0.117",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",