Comparing version 1.4.2 to 1.4.4
{ | ||
"name": "mongot", | ||
"version": "1.4.2", | ||
"version": "1.4.4", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "@types/mongodb": { |
{ | ||
"name": "mongot", | ||
"version": "1.4.2", | ||
"version": "1.4.4", | ||
"description": "MongoT is a modern ODM library for MongoDb.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
import { SchemaMetadata } from "../document"; | ||
import { Collection } from "../collection"; | ||
import { indexSpecType } from "../schema"; | ||
export declare class MetadataStore { | ||
private constructor(); | ||
static setCollectionMetadata(target: typeof Collection, name: string, construct?: typeof SchemaMetadata, options?: Object): void; | ||
static setCollectionIndexMetadata(target: typeof Collection, indexOrSpec: string | { | ||
[key: string]: 1 | -1; | ||
}, options?: Object): void; | ||
static setCollectionIndexMetadata(target: typeof Collection, indexOrSpec: indexSpecType, options?: Object): void; | ||
static getCollectionIndexMetadata(target: typeof Collection): { | ||
indexOrSpec: string | { | ||
[key: string]: 1 | -1; | ||
}; | ||
indexOrSpec: indexSpecType; | ||
options?: Object; | ||
@@ -14,0 +11,0 @@ }[]; |
@@ -8,14 +8,11 @@ import "./reflect"; | ||
} | ||
export declare type indexSpecType = string | { | ||
[key: string]: 1 | -1 | 'text' | 'hashed' | '2dsphere'; | ||
}; | ||
export interface IndexDecorator { | ||
(indexOrSpec: string | { | ||
[key: string]: 1 | -1; | ||
}, options?: MongoDb.IndexOptions): (constructor: typeof Collection) => void; | ||
(indexOrSpec: indexSpecType, options?: MongoDb.IndexOptions): (constructor: typeof Collection) => void; | ||
} | ||
export declare const collection: CollectionDecorator; | ||
export declare const index: IndexDecorator; | ||
export declare const indexes: (...specs: ([string | { | ||
[key: string]: 1 | -1; | ||
}, MongoDb.IndexOptions] | [string | { | ||
[key: string]: 1 | -1; | ||
}])[]) => (target: typeof Collection) => void; | ||
export declare const indexes: (...specs: ([indexSpecType, MongoDb.IndexOptions] | [indexSpecType])[]) => (target: typeof Collection) => void; | ||
export declare const document: (target: any) => any; | ||
@@ -22,0 +19,0 @@ export declare const fragment: (target: any) => any; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
146464
2239