UNPKG

lakutata

Version:

An IoC-based universal application framework.

73 lines (67 loc) 2.36 kB
import { BaseObject } from './TypeDef.internal.120.js'; import { ClassDecorator, PropertyDecorator } from './TypeDef.internal.100.js'; import { LifetimeType } from './TypeDef.internal.128.js'; import { Schema } from './TypeDef.internal.129.js'; import { InjectionName, InjectionTransformFunction } from './TypeDef.internal.116.js'; /** * Class Decorator * @param lifetime * @param lock * @constructor */ declare function Lifetime<ClassConstructor extends typeof BaseObject>(lifetime: LifetimeType, lock?: boolean): ClassDecorator<ClassConstructor>; /** * Class Decorator * @param lock * @constructor */ declare function Singleton<ClassConstructor extends typeof BaseObject>(lock?: boolean): ClassDecorator<ClassConstructor>; /** * Class Decorator * @param lock * @constructor */ declare function Transient<ClassConstructor extends typeof BaseObject>(lock?: boolean): ClassDecorator<ClassConstructor>; /** * Class Decorator * @param lock * @constructor */ declare function Scoped<ClassConstructor extends typeof BaseObject>(lock?: boolean): ClassDecorator<ClassConstructor>; /** * Class Decorator * @constructor */ declare function Autoload<ClassConstructor extends typeof BaseObject>(): ClassDecorator<ClassConstructor>; /** * Property Decorator * @param schema * @param fn * @constructor */ declare function Configurable<ClassPrototype extends BaseObject, DataType>(schema?: Schema<DataType>, fn?: (this: ClassPrototype, value: DataType) => DataType | Promise<DataType>): PropertyDecorator<ClassPrototype>; /** * * @constructor */ declare function Inject<ClassPrototype extends BaseObject>(): PropertyDecorator<ClassPrototype>; /** * Property Decorator * @param name * @constructor */ declare function Inject<ClassPrototype extends BaseObject>(name: InjectionName): PropertyDecorator<ClassPrototype>; /** * Property Decorator * @param transform * @constructor */ declare function Inject<ClassPrototype extends BaseObject>(transform: InjectionTransformFunction): PropertyDecorator<ClassPrototype>; /** * Property Decorator * @param name * @param transform * @constructor */ declare function Inject<ClassPrototype extends BaseObject>(name: InjectionName, transform: InjectionTransformFunction): PropertyDecorator<ClassPrototype>; export { Autoload, Configurable, Inject, Lifetime, Scoped, Singleton, Transient };