UNPKG

@dipscope/type-manager

Version:

Transform JSON strings or plain objects into JS class instances.

68 lines 1.95 kB
import { InjectIndex } from './inject-index'; import { InjectOptions } from './inject-options'; import { PropertyName } from './property-name'; import { PropertyOptions } from './property-options'; import { TypeMetadata } from './type-metadata'; /** * Special class to create a scope over a certain type. This class used only in * combination with decorators and not required for declarative configuration. * * @type {TypeScope} */ export declare class TypeScope { /** * Scope open? * * @type {boolean}; */ private opened; /** * Property options array map. * * @type {Map<PropertyName, Array<PropertyOptions<any>>>} */ private propertyOptionsArrayMap; /** * Inject options array map. * * @type {Map<InjectIndex, Array<InjectOptions<any>>>} */ private injectOptionsArrayMap; /** * Constructor. */ constructor(); /** * Opens a scope. * * @returns {this} Type scope. */ open(): this; /** * Adds property options to the type scope. * * @param {PropertyName} propertyName Property name. * @param {PropertyOptions<any>} propertyOptions Property options. * * @returns {this} Type scope. */ addPropertyOptions(propertyName: PropertyName, propertyOptions: PropertyOptions<any>): this; /** * Adds inject options to the type scope. * * @param {InjectIndex} injectIndex Inject index. * @param {InjectOptions<any>} injectOptions Inject options. * * @returns {this} Type scope. */ addInjectOptions(injectIndex: InjectIndex, injectOptions: InjectOptions<any>): this; /** * Closes scope and applies state for type metadata. * * @param {TypeMetadata<any>} typeMetadata Type metadata. * * @returns {this} Type scope. */ close(typeMetadata: TypeMetadata<any>): this; } //# sourceMappingURL=type-scope.d.ts.map