UNPKG

23.8 kBTypeScriptView Raw
1import type * as mongoose from 'mongoose';
2import type { Severity, PropType } from './internal/constants';
3/**
4 * Get the Type of an instance of a Document with Class properties
5 * @example
6 * ```ts
7 * class ClassName {}
8 * const NameModel = getModelForClass(ClassName);
9 *
10 * const doc: DocumentType<ClassName> = await NameModel.create({});
11 * ```
12 */
13export type DocumentType<T, QueryHelpers = BeAnObject> = (T extends {
14 _id: unknown;
15} ? mongoose.Document<T['_id'], QueryHelpers, T> : mongoose.Document<any, QueryHelpers, T>) & T & IObjectWithTypegooseFunction;
16/**
17 * Get the Type of an instance of a SubDocument with Class properties
18 */
19export type SubDocumentType<T, QueryHelpers = BeAnObject> = DocumentType<T, QueryHelpers> & mongoose.Types.Subdocument;
20/**
21 * Get the Type of an instance of a SubDocument that exists within an array, with Class properties
22 */
23export type ArraySubDocumentType<T, QueryHelpers = BeAnObject> = DocumentType<T, QueryHelpers> & mongoose.Types.ArraySubdocument;
24/**
25 * Used Internally for ModelTypes
26 */
27export type ModelType<T, QueryHelpers = BeAnObject> = mongoose.Model<DocumentType<T, QueryHelpers>, QueryHelpers>;
28/**
29 * Any-param Constructor
30 */
31export type AnyParamConstructor<T> = new (...args: any) => T;
32/**
33 * The Type for Models used in typegoose, mostly returned by "getModelForClass" and "addModelToTypegoose"
34 * @example
35 * const Model: ReturnModelType<typeof YourClass, YourClassQueryHelper> = mongoose.model("YourClass", YourClassSchema);
36 */
37export type ReturnModelType<U extends AnyParamConstructor<any>, QueryHelpers = BeAnObject> = ModelType<InstanceType<U>, QueryHelpers> & U;
38/** Generic "Function" type, because typescript does not like using "Function" directly in strict mode */
39export type Func = (...args: any[]) => any;
40/**
41 * The Type of a function to generate a custom model name.
42 */
43export type CustomNameFunction = (options: IModelOptions) => string;
44/**
45 * Defer an reference with an function (or as other projects call it "Forward declaration")
46 * @param type This is just to comply with the common pattern of `type => ActualType`
47 */
48export type DeferredFunc<T = any> = (...args: unknown[]) => T;
49/**
50 * Dynamic Functions, since mongoose 4.13
51 * @param doc The Document current document
52 */
53export type DynamicStringFunc<T extends AnyParamConstructor<any>> = (doc: DocumentType<T>) => string;
54/** Type to keep the "discriminators" options consistent in types */
55export type NestedDiscriminatorsFunction = DeferredFunc<(AnyParamConstructor<any> | DiscriminatorObject)[]>;
56/**
57 * This Interface for most properties uses "mongoose.SchemaTypeOptions<any>['']", but for some special (or typegoose custom) options, it is not used
58 *
59 * Example: `index` is directly from mongoose, where as `type` is from typegoose
60 */
61export interface BasePropOptions {
62 /**
63 * include this value?
64 * @default true (Implicitly)
65 */
66 select?: mongoose.SchemaTypeOptions<any>['select'];
67 /**
68 * is this value required?
69 * @default false (Implicitly)
70 */
71 required?: mongoose.SchemaTypeOptions<any>['required'];
72 /** Only accept Values from the Enum(|Array) */
73 enum?: mongoose.SchemaTypeOptions<any>['enum'];
74 /**
75 * Add "null" to the enum array
76 * Note: Custom Typegoose Option
77 */
78 addNullToEnum?: boolean;
79 /**
80 * Set Custom "warnMixed" Severity for a specific property
81 * Overwrites Severity set in "modelOptions" for a specific property
82 * Note: Custom Typegoose Option
83 */
84 allowMixed?: Severity;
85 /** Give the Property a default Value */
86 default?: mongoose.SchemaTypeOptions<any>['default'];
87 /** Give an Validator RegExp or Function */
88 validate?: mongoose.SchemaTypeOptions<any>['validate'];
89 /**
90 * Should this property have an "unique" index?
91 * @link https://docs.mongodb.com/manual/indexes/#unique-indexes
92 */
93 unique?: mongoose.SchemaTypeOptions<any>['unique'];
94 /**
95 * Should this property have an index?
96 * Note: don't use this if you want to do an compound index
97 * @link https://docs.mongodb.com/manual/indexes
98 */
99 index?: mongoose.SchemaTypeOptions<any>['index'];
100 /**
101 * Should this property have an "sparse" index?
102 * @link https://docs.mongodb.com/manual/indexes/#sparse-indexes
103 */
104 sparse?: mongoose.SchemaTypeOptions<any>['sparse'];
105 /**
106 * Should this property have an "expires" index?
107 * @link https://docs.mongodb.com/manual/tutorial/expire-data
108 */
109 expires?: mongoose.SchemaTypeOptions<any>['expires'];
110 /**
111 * Should this property have an "text" index?
112 * @link https://mongoosejs.com/docs/api/schematype.html#schematype_SchemaType-text
113 */
114 text?: mongoose.SchemaTypeOptions<any>['text'];
115 /** Should subdocuments get their own id?
116 * @default true (Implicitly)
117 */
118 _id?: mongoose.SchemaTypeOptions<any>['_id'];
119 /**
120 * Set a Setter (Non-Virtual) to pre-process your value
121 * (when using get/set both are required)
122 * Please note that the option `type` is required, if get/set saves a different value than what is defined
123 * @param value The Value that needs to get modified
124 * @returns The Value, but modified OR anything
125 * @example
126 * ```ts
127 * function setHello(val: string): string {
128 * return val.toLowerCase()
129 * }
130 * function getHello(val: string): string {
131 * return val.toUpperCase();
132 * }
133 * class Dummy {
134 * @prop({ set: setHello, get: getHello }) // many options can be used, like required
135 * public hello: string;
136 * }
137 * ```
138 */
139 set?: mongoose.SchemaTypeOptions<any>['set'];
140 /**
141 * Set a Getter (Non-Virtual) to Post-process your value
142 * (when using get/set both are required)
143 * Please note that the option `type` is required, if get/set saves a different value than what is defined
144 * @param value The Value that needs to get modified
145 * @returns The Value, but modified OR anything
146 * @example
147 * ```ts
148 * function setHello(val: string): string {
149 * return val.toLowerCase()
150 * }
151 * function getHello(val: string): string {
152 * return val.toUpperCase();
153 * }
154 * class Dummy {
155 * @prop({ set: setHello, get: getHello }) // many options can be used, like required
156 * public hello: string;
157 * }
158 * ```
159 */
160 get?: mongoose.SchemaTypeOptions<any>['get'];
161 /**
162 * This may be needed if get/set is used
163 * (this sets the type how it is saved to the DB)
164 */
165 type?: DeferredFunc<AnyParamConstructor<any>> | DeferredFunc<unknown> | unknown;
166 /**
167 * Make a property read-only
168 * @example
169 * ```ts
170 * class SomeClass {
171 * @prop({ immutable: true })
172 * public someprop: Readonly<string>;
173 * }
174 * ```
175 */
176 immutable?: mongoose.SchemaTypeOptions<any>['immutable'];
177 /**
178 * Give the Property an alias in the output
179 *
180 * Note: you should include the alias as a variable in the class, but not with a prop decorator
181 * @example
182 * ```ts
183 * class Dummy {
184 * @prop({ alias: "helloWorld" })
185 * public hello: string; // normal, with @prop
186 * public helloWorld: string; // is just for type Completion, will not be included in the DB
187 * }
188 * ```
189 */
190 alias?: mongoose.SchemaTypeOptions<any>['alias'];
191 /**
192 * This option as only an effect when the plugin `mongoose-autopopulate` is used
193 */
194 autopopulate?: boolean | Function | KeyStringAny;
195 /** Reference an other Document (you should use Ref<T> as Prop type) */
196 ref?: DeferredFunc<string | AnyParamConstructor<any> | DynamicStringFunc<any>> | string | AnyParamConstructor<any>;
197 /** Take the Path and try to resolve it to a Model */
198 refPath?: string;
199 /**
200 * Set the Nested Discriminators
201 *
202 * Note: "_id: false" as an prop option doesn't work here
203 *
204 * Note: Custom Typegoose Option
205 */
206 discriminators?: NestedDiscriminatorsFunction;
207 /**
208 * Use option {@link BasePropOptions.type}
209 * @see https://typegoose.github.io/typegoose/docs/api/decorators/prop#map-options
210 * @see https://typegoose.github.io/typegoose/docs/api/decorators/prop#proptype
211 */
212 of?: never;
213 /**
214 * If true, uses Mongoose's default `_id` settings. Only allowed for ObjectIds
215 *
216 * Note: Copied from mongoose's "index.d.ts"#SchemaTypeOptions
217 */
218 auto?: mongoose.SchemaTypeOptions<any>['auto'];
219 /**
220 * The default [subtype](http://bsonspec.org/spec.html) associated with this buffer when it is stored in MongoDB. Only allowed for buffer paths
221 *
222 * Note: Copied from mongoose's "index.d.ts"#SchemaTypeOptions
223 */
224 subtype?: mongoose.SchemaTypeOptions<any>['subtype'];
225 /**
226 * If `true`, Mongoose will skip gathering indexes on subpaths. Only allowed for subdocuments and subdocument arrays.
227 *
228 * Note: Copied from mongoose's "index.d.ts"#SchemaTypeOptions
229 */
230 excludeIndexes?: mongoose.SchemaTypeOptions<any>['excludeIndexes'];
231 /**
232 * Define a transform function for this individual schema type.
233 * Only called when calling `toJSON()` or `toObject()`.
234 *
235 * Note: Copied from mongoose's "index.d.ts"#SchemaTypeOptions
236 */
237 transform?: mongoose.SchemaTypeOptions<any>['transform'];
238 [extra: string]: any;
239}
240export interface InnerOuterOptions {
241 /**
242 * Use this to define inner-options
243 * Use this if the auto-mapping is not correct or for plugin options
244 *
245 * Please open a new issue if some option is mismatched or not existing / mapped
246 */
247 innerOptions?: KeyStringAny;
248 /**
249 * Use this to define outer-options
250 * Use this if the auto-mapping is not correct or for plugin options
251 *
252 * Please open a new issue if some option is mismatched or not existing / mapped
253 */
254 outerOptions?: KeyStringAny;
255}
256/**
257 * Internal type for `utils.mapOptions`
258 * @internal
259 */
260export interface MappedInnerOuterOptions {
261 /**
262 * Mapped options for the inner of the Type
263 */
264 inner: NonNullable<KeyStringAny>;
265 /**
266 * Mapped options for the outer of the type
267 */
268 outer: NonNullable<KeyStringAny>;
269}
270/** Options for Array's */
271export interface ArrayPropOptions extends BasePropOptions, InnerOuterOptions {
272 /**
273 * How many dimensions this Array should have
274 * (needs to be higher than 0)
275 *
276 * Note: Custom Typegoose Option
277 * @default 1
278 */
279 dim?: number;
280 /**
281 * Set if Non-Array values will be cast to an array
282 *
283 * NOTE: This option currently only really affects "DocumentArray" and not normal arrays, https://github.com/Automattic/mongoose/issues/10398
284 * @see https://mongoosejs.com/docs/api/schemaarray.html#schemaarray_SchemaArray.options
285 * @example
286 * ```ts
287 * new Model({ array: "string" });
288 * // will be cast to equal
289 * new Model({ array: ["string"] });
290 * ```
291 * @default true
292 */
293 castNonArrays?: boolean;
294}
295/** Options For Map's */
296export interface MapPropOptions extends BasePropOptions, InnerOuterOptions {
297}
298export interface ValidateNumberOptions {
299 /** Only allow numbers that are higher than this */
300 min?: mongoose.SchemaTypeOptions<any>['min'];
301 /** Only allow numbers lower than this */
302 max?: mongoose.SchemaTypeOptions<any>['max'];
303 /** Only allow Values from the enum */
304 enum?: number[];
305}
306export interface ValidateStringOptions {
307 /** Only allow values that match this RegExp */
308 match?: mongoose.SchemaTypeOptions<any>['match'];
309 /** Only allow Values from the enum */
310 enum?: string[];
311 /** Only allow values that have at least this length */
312 minlength?: mongoose.SchemaTypeOptions<any>['minlength'];
313 /** Only allow values that have at max this length */
314 maxlength?: mongoose.SchemaTypeOptions<any>['maxlength'];
315}
316export interface TransformStringOptions {
317 /** Should it be lowercased before save? */
318 lowercase?: mongoose.SchemaTypeOptions<any>['lowercase'];
319 /** Should it be uppercased before save? */
320 uppercase?: mongoose.SchemaTypeOptions<any>['uppercase'];
321 /** Should it be trimmed before save? */
322 trim?: mongoose.SchemaTypeOptions<any>['trim'];
323}
324export interface VirtualOptions {
325 /** Reference another Document (Ref<T> should be used as property type) */
326 ref: NonNullable<BasePropOptions['ref']>;
327 /** Which property(on the current-Class) to match `foreignField` against */
328 localField: mongoose.VirtualTypeOptions['localField'];
329 /** Which property(on the ref-Class) to match `localField` against */
330 foreignField: mongoose.VirtualTypeOptions['foreignField'];
331 /** Return as One Document(true) or as Array(false) */
332 justOne?: mongoose.VirtualTypeOptions['justOne'];
333 /** Return the number of Documents found instead of the actual Documents */
334 count?: mongoose.VirtualTypeOptions['count'];
335 /** Extra Query Options */
336 options?: mongoose.VirtualTypeOptions['options'];
337 /** Match Options */
338 match?: mongoose.VirtualTypeOptions['match'];
339 /**
340 * If you set this to `true`, Mongoose will call any custom getters you defined on this virtual.
341 *
342 * Note: Copied from mongoose's "index.d.ts"#VirtualTypeOptions
343 */
344 getters?: mongoose.VirtualTypeOptions['getters'];
345 /**
346 * Add a default `limit` to the `populate()` query.
347 *
348 * Note: Copied from mongoose's "index.d.ts"#VirtualTypeOptions
349 */
350 limit?: mongoose.VirtualTypeOptions['limit'];
351 /**
352 * Add a default `skip` to the `populate()` query.
353 *
354 * Note: Copied from mongoose's "index.d.ts"#VirtualTypeOptions
355 */
356 skip?: mongoose.VirtualTypeOptions['skip'];
357 /**
358 * For legacy reasons, `limit` with `populate()` may give incorrect results because it only
359 * executes a single query for every document being populated. If you set `perDocumentLimit`,
360 * Mongoose will ensure correct `limit` per document by executing a separate query for each
361 * document to `populate()`. For example, `.find().populate({ path: 'test', perDocumentLimit: 2 })`
362 * will execute 2 additional queries if `.find()` returns 2 documents.
363 *
364 * Note: Copied from mongoose's "index.d.ts"#VirtualTypeOptions
365 */
366 perDocumentLimit?: mongoose.VirtualTypeOptions['perDocumentLimit'];
367 [extra: string]: any;
368}
369export type PropOptionsForNumber = BasePropOptions & ValidateNumberOptions;
370export type PropOptionsForString = BasePropOptions & TransformStringOptions & ValidateStringOptions;
371export type RefType = mongoose.RefType;
372/**
373 * Reference another Model
374 */
375export type Ref<PopulatedType, RawId extends mongoose.RefType = PopulatedType extends {
376 _id?: mongoose.RefType;
377} ? NonNullable<PopulatedType['_id']> : mongoose.Types.ObjectId> = mongoose.PopulatedDoc<DocumentType<PopulatedType>, RawId>;
378export interface DiscriminatorObject {
379 /** The Class to use */
380 type: AnyParamConstructor<any>;
381 /**
382 * The Name to differentiate between other classes
383 * Mongoose JSDOC: [value] the string stored in the `discriminatorKey` property. If not specified, Mongoose uses the `name` parameter.
384 * @default {string} The output of "getName"
385 */
386 value?: string;
387}
388export interface IModelOptions {
389 /** An Existing Mongoose Connection */
390 existingMongoose?: mongoose.Mongoose;
391 /** Supports all Mongoose's Schema Options */
392 schemaOptions?: mongoose.SchemaOptions;
393 /** An Existing Connection */
394 existingConnection?: mongoose.Connection;
395 /** Typegoose Custom Options */
396 options?: ICustomOptions;
397}
398/** Interface for just all naming options */
399export interface INamingOptions {
400 /** Same as in {@link ICustomOptions} */
401 customName?: ICustomOptions['customName'];
402 /** Same as in {@link ICustomOptions} */
403 automaticName?: ICustomOptions['automaticName'];
404 /** Same as in {@link mongoose.SchemaOptions} */
405 schemaCollection?: mongoose.SchemaOptions['collection'];
406}
407/** Typegoose options, mostly for "modelOptions({ options: ICustomOptions })" */
408export interface ICustomOptions {
409 /**
410 * Set the modelName of the class.
411 * If it is a function, the function will be executed. The function will override
412 * "automaticName". If "automaticName" is true and "customName" is a string, it
413 * sets a *suffix* instead of the whole name.
414 * @default schemaOptions.collection
415 */
416 customName?: string | CustomNameFunction;
417 /**
418 * Enable Automatic Name generation of a model
419 * Example:
420 * class with name of "SomeClass"
421 * and option "collection" of "SC"
422 *
423 * will generate the name of "SomeClass_SC"
424 * @default false
425 */
426 automaticName?: boolean;
427 /** Allow "mongoose.Schema.Types.Mixed"? */
428 allowMixed?: Severity;
429 /**
430 * Enable Overwriting of the plugins on the "to-be" discriminator schema with the base schema's
431 * Note: this does not actually "merge plugins", it will overwrite the "to-be" discriminator's plugins with the base schema's
432 * If {@link ICustomOptions.enableMergePlugins} and {@link ICustomOptions.enableMergeHooks} are both "false", then the global plugins will be automatically applied by typegoose, see https://github.com/Automattic/mongoose/issues/12696
433 * @default false
434 */
435 enableMergePlugins?: boolean;
436 /**
437 * Enable Merging of Hooks
438 * Note: only hooks that can be matched against each-other can be de-duplicated
439 * If {@link ICustomOptions.enableMergePlugins} and {@link ICustomOptions.enableMergeHooks} are both "false", then the global plugins will be automatically applied by typegoose, see https://github.com/Automattic/mongoose/issues/12696
440 * @default false
441 */
442 enableMergeHooks?: boolean;
443 /**
444 * Disable all lower indexes than this class (works like `sch.clone().clearIndexes()`)
445 * @default false
446 */
447 disableLowerIndexes?: boolean;
448 /**
449 * Set the Nested Discriminators on the *base* of the Discriminators
450 *
451 * This option can be used over the prop-option to not have to re-define discriminators if used in multiple classes
452 */
453 discriminators?: NestedDiscriminatorsFunction;
454}
455/** Extra options for "_buildSchema" in "schema.ts" */
456export interface IBuildSchemaOptions {
457 /**
458 * Add indexes from this class?
459 * will be "false" when "ICustomOptions.disableLowerIndexes" is "true" for some upper class
460 * @default true
461 */
462 buildIndexes?: boolean;
463}
464/** Type for the Values stored in the Reflection for Properties */
465export interface DecoratedPropertyMetadata {
466 /** Prop Options */
467 options: KeyStringAny;
468 /** The Target Reflection target for getting metadata from keys */
469 target: AnyParamConstructor<any>;
470 /** Property name */
471 key: string | symbol;
472 /** What is it for a prop type? */
473 propType?: PropType;
474}
475export type DecoratedPropertyMetadataMap = Map<string | symbol, DecoratedPropertyMetadata>;
476/**
477 * Alias of "mongoose.IndexOptions" for convenience
478 */
479export type IndexOptions = mongoose.IndexOptions;
480/**
481 * Type for the Values stored in the Reflection for Indexes
482 * @example
483 * ```ts
484 * const indices: IIndexArray[] = Reflect.getMetadata(DecoratorKeys.Index, target) || []);
485 * ```
486 */
487export interface IIndexArray {
488 fields: KeyStringAny;
489 options?: IndexOptions;
490}
491/**
492 * Type for the Values stored in the Reflection for Plugins
493 * @example
494 * ```ts
495 * const plugins: IPluginsArray[] = Array.from(Reflect.getMetadata(DecoratorKeys.Plugins, target) ?? []);
496 * ```
497 */
498export interface IPluginsArray {
499 /** The Plugin Function to add */
500 mongoosePlugin: Func;
501 /** The Plugin's options, which could be anything because mongoose does not enforce it to be a object */
502 options: any | undefined;
503}
504/**
505 * Type for the Values stored in the Reflection for Virtual Populates
506 * @example
507 * ```ts
508 * const virtuals: VirtualPopulateMap = new Map(Reflect.getMetadata(DecoratorKeys.VirtualPopulate, target.constructor) ?? []);
509 * ```
510 */
511export type VirtualPopulateMap = Map<string, VirtualOptions & Record<string, unknown>>;
512/**
513 * Gets the signature (parameters with their types, and the return type) of a function type.
514 *
515 * @description Should be used when defining an interface for a class that uses query methods.
516 *
517 * @example
518 * ```ts
519 * function sendMessage(recipient: string, sender: string, priority: number, retryIfFails: boolean) {
520 * // some logic...
521 * return true;
522 * }
523 *
524 * // Both of the following types will be identical.
525 * type SendMessageType = AsQueryMethod<typeof sendMessage>;
526 * type SendMessageManualType = (recipient: string, sender: string, priority: number, retryIfFails: boolean) => boolean;
527 * ```
528 */
529export type AsQueryMethod<T extends (...args: any) => any> = (...args: Parameters<T>) => ReturnType<T>;
530/**
531 * Helper type to easily set the `this` type in a QueryHelper function
532 *
533 * @example
534 * function findById(this: QueryHelperThis<YourClass, YourClassQueryHelpers>, id: string) {
535 * return this.findOne({ _id: id });
536 * }
537 */
538export type QueryHelperThis<T extends AnyParamConstructor<any>, QueryHelpers, S = DocumentType<T, QueryHelpers>> = mongoose.QueryWithHelpers<S | null, S, QueryHelpers>;
539/**
540 * Type for the Values stored in the Reflection for Query Methods
541 * @example
542 * ```ts
543 * const queryMethods: QueryMethodMap = new Map(Reflect.getMetadata(DecoratorKeys.QueryMethod, target) ?? []);
544 * ```
545 */
546export type QueryMethodMap = Map<string, Func>;
547/**
548 * Type for the Values stored in the Reflection for Nested Discriminators
549 * @example
550 * ```ts
551 * const disMap: NestedDiscriminatorsMap = new Map(Reflect.getMetadata(DecoratorKeys.NestedDiscriminators, target) ?? []);
552 * ```
553 */
554export type NestedDiscriminatorsMap = Map<string, DiscriminatorObject[]>;
555/** A Helper type to combine both mongoose Hook Option types */
556export type HookOptionsEither = mongoose.SchemaPreOptions | mongoose.SchemaPostOptions;
557/**
558 * Type for the Values stored in the Reflection for Hooks
559 * @example
560 * ```ts
561 * const postHooks: IHooksArray[] = Array.from(Reflect.getMetadata(DecoratorKeys.HooksPost, target) ?? []);
562 * ```
563 */
564export interface IHooksArray {
565 /** The Function to add as a hooks */
566 func: Func;
567 /** The Method to where this hook gets triggered */
568 methods: (string | RegExp)[];
569 /**
570 * Options for Hooks
571 * @see https://mongoosejs.com/docs/middleware.html#naming
572 */
573 options?: HookOptionsEither;
574}
575export interface IGlobalOptions {
576 /** Typegoose Options */
577 options?: ICustomOptions;
578 /** Schema Options that should get applied to all models */
579 schemaOptions?: mongoose.SchemaOptions;
580 /**
581 * Global Options for general Typegoose
582 * (There are currently none)
583 */
584 globalOptions?: BeAnObject;
585}
586/** Interface describing a Object that has a "typegooseName" Function */
587export interface IObjectWithTypegooseFunction {
588 typegooseName(): string;
589}
590/** For the types that error that seemingly don't have a prototype */
591export interface IPrototype {
592 prototype?: any;
593}
594/** An Helper Interface for defining a "key" index of "string" and "value" of "any" */
595export type KeyStringAny = Record<string, any>;
596/**
597 * The Return Type of "utils.getType"
598 */
599export interface GetTypeReturn {
600 type: unknown;
601 dim: number;
602}
603/**
604 * This type is for lint error "ban-types" where "{}" would be used
605 * This type is separate from "{@link KeyStringAny}" because it has a different meaning
606 */
607export type BeAnObject = Record<string, any>;
608/** Options used for "processProp" */
609export interface ProcessPropOptions extends DecoratedPropertyMetadata {
610 /** The target Class's static version */
611 cl: AnyParamConstructor<any>;
612}