ts-mongoose
Advanced tools
Comparing version 0.0.13 to 0.0.14
import { SchemaTypeOpts, Types } from 'mongoose'; | ||
import { Extract } from './types'; | ||
import { Extract, ConvertObject } from './types'; | ||
export declare const Type: { | ||
@@ -17,12 +17,12 @@ string: (options?: SchemaTypeOpts<string>) => string; | ||
object: (options?: SchemaTypeOpts<object>) => { | ||
of<T>(schema: T): T; | ||
of<T>(schema: T): ConvertObject<T>; | ||
}; | ||
optionalObject: (options?: SchemaTypeOpts<object>) => { | ||
of<T>(schema: T): T; | ||
of<T>(schema: T): ConvertObject<T> | null | undefined; | ||
}; | ||
array: (options?: SchemaTypeOpts<any[]>) => { | ||
of<T>(schema: T): T[]; | ||
of<T>(schema: T): ConvertObject<T>[]; | ||
}; | ||
optionalArray: (options?: SchemaTypeOpts<any[]>) => { | ||
of<T>(schema: T): T[]; | ||
of<T>(schema: T): ConvertObject<T>[] | null | undefined; | ||
}; | ||
@@ -33,3 +33,3 @@ schema: (options?: SchemaTypeOpts<object>) => { | ||
optionalSchema: (options?: SchemaTypeOpts<object>) => { | ||
of<T>(schema: T): Extract<T>; | ||
of<T>(schema: T): Extract<T> | null | undefined; | ||
}; | ||
@@ -36,0 +36,0 @@ ref: <T>(schema: T) => { |
{ | ||
"name": "ts-mongoose", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
import { SchemaTypeOpts, Types } from 'mongoose'; | ||
import { Extract } from './types'; | ||
import { Extract, ConvertObject } from './types'; | ||
export declare const Type: { | ||
@@ -17,12 +17,12 @@ string: (options?: SchemaTypeOpts<string>) => string; | ||
object: (options?: SchemaTypeOpts<object>) => { | ||
of<T>(schema: T): T; | ||
of<T>(schema: T): ConvertObject<T>; | ||
}; | ||
optionalObject: (options?: SchemaTypeOpts<object>) => { | ||
of<T>(schema: T): T; | ||
of<T>(schema: T): ConvertObject<T> | null | undefined; | ||
}; | ||
array: (options?: SchemaTypeOpts<any[]>) => { | ||
of<T>(schema: T): T[]; | ||
of<T>(schema: T): ConvertObject<T>[]; | ||
}; | ||
optionalArray: (options?: SchemaTypeOpts<any[]>) => { | ||
of<T>(schema: T): T[]; | ||
of<T>(schema: T): ConvertObject<T>[] | null | undefined; | ||
}; | ||
@@ -33,3 +33,3 @@ schema: (options?: SchemaTypeOpts<object>) => { | ||
optionalSchema: (options?: SchemaTypeOpts<object>) => { | ||
of<T>(schema: T): Extract<T>; | ||
of<T>(schema: T): Extract<T> | null | undefined; | ||
}; | ||
@@ -36,0 +36,0 @@ ref: <T>(schema: T) => { |
24841
30
482