@typegoose/typegoose
Version:
Define Mongoose models using TypeScript classes
80 lines (79 loc) • 2.11 kB
TypeScript
/**
* Collection of Reflect Types for easy maintenance
*/
export declare enum DecoratorKeys {
/** Get the Typescript assigned Type at runtime */
Type = "design:type",
/**
* "@prop" Cache
* -> Use only for a class
*/
PropCache = "typegoose:properties",
/**
* Storage location for Model Options
* -> Use only for a class
*/
ModelOptions = "typegoose:options",
/**
* Storage location for Indexes
* -> Use only for a class
*/
Index = "typegoose:indexes",
/**
* Storage location for Search Indexes
* -> Use only for a class
*/
SearchIndex = "typegoose:searchIndexes",
/**
* Storage location for Plugins
* -> Use only for a class
*/
Plugins = "typegoose:plugins",
/**
* Storage location for Pre-Hooks
* -> Use only for a class
*/
HooksPre = "typegoose:hooksPre",
/**
* Storage location for Post-Hooks
* -> Use only for a class
*/
HooksPost = "typegoose:hooksPost",
/**
* Storage location for Virtual Populates
* -> Use only for a class
*/
VirtualPopulate = "typegoose:virtualPopulate",
/**
* Storage location for Query Methods
* -> Use only for a class
*/
QueryMethod = "typegoose:queryMethod",
/**
* Storage location for Nested Discriminators
* -> Use only for a class
*/
NestedDiscriminators = "typegoose:nestedDiscriminators",
/**
* Storage location for Cached Schemas
* -> Use only for a class
*/
CachedSchema = "typegoose:cachedSchema"
}
/** This Enum is meant for baseProp to decide for different props (like if it is an arrayProp or prop or mapProp) */
export declare enum PropType {
ARRAY = 0,
MAP = 1,
NONE = 2
}
/** Severity levels for soft-warnings */
export declare enum Severity {
ALLOW = 0,
WARN = 1,
ERROR = 2
}
/**
* Symbol to track if options have already been merged
* This is to reduce the "merge*" calls, which dont need to be run often if already done
*/
export declare const AlreadyMerged: unique symbol;