octonom
Version:
Object Document Mapper for any database
36 lines (35 loc) • 1.67 kB
TypeScript
import { Model } from '../model';
import { AnySchema, IAnyOptions } from './any';
import { ArraySchema, IArrayOptions } from './array';
import { BooleanSchema, IBooleanOptions } from './boolean';
import { DateSchema, IDateOptions } from './date';
import { IModelOptions, ModelSchema } from './model';
import { INumberOptions, NumberSchema } from './number';
import { IObjectOptions, ObjectSchema } from './object';
import { IReferenceOptions, ReferenceSchema } from './reference';
import { ISchema, ISchemaInstance, SchemaMap } from './schema';
import { IStringOptions, StringSchema } from './string';
export { SchemaMap };
export declare function getSchemaDecorator(createSchema: () => ISchema<any, ISchemaInstance>): PropertyDecorator;
export declare const Property: {
Any: (options?: IAnyOptions) => PropertyDecorator;
Array: <T>(options: IArrayOptions<any>) => PropertyDecorator;
Boolean: (options?: IBooleanOptions) => PropertyDecorator;
Date: (options?: IDateOptions) => PropertyDecorator;
Model: (options: IModelOptions<Model>) => PropertyDecorator;
Number: (options?: INumberOptions) => PropertyDecorator;
Object: (options: IObjectOptions<object>) => PropertyDecorator;
Reference: (options: IReferenceOptions<Model>) => PropertyDecorator;
String: (options?: IStringOptions) => PropertyDecorator;
};
export declare const Schema: {
Any: typeof AnySchema;
Array: typeof ArraySchema;
Boolean: typeof BooleanSchema;
Date: typeof DateSchema;
Model: typeof ModelSchema;
Number: typeof NumberSchema;
Object: typeof ObjectSchema;
Reference: typeof ReferenceSchema;
String: typeof StringSchema;
};