UNPKG

@inversifyjs/core

Version:

InversifyJs core package

84 lines 2.57 kB
import { ClassElementMetadataKind } from '../models/ClassElementMetadataKind.js'; export class ClassMetadataFixtures { static get any() { const fixture = { constructorArguments: [], lifecycle: { postConstructMethodNames: new Set(), preDestroyMethodNames: new Set(), }, properties: new Map(), scope: undefined, }; return fixture; } static get withUnmanagedConstructorArguments() { const fixture = { ...ClassMetadataFixtures.any, constructorArguments: [ { kind: ClassElementMetadataKind.unmanaged, }, ], }; return fixture; } static get withSingleInjectionConstructorArguments() { const fixture = { ...ClassMetadataFixtures.any, constructorArguments: [ { kind: ClassElementMetadataKind.singleInjection, name: undefined, optional: false, tags: new Map(), value: Symbol(), }, ], }; return fixture; } static get withSingleInjectionProperty() { const fixture = { ...ClassMetadataFixtures.any, properties: new Map([ [ Symbol(), { kind: ClassElementMetadataKind.singleInjection, name: undefined, optional: false, tags: new Map(), value: Symbol(), }, ], ]), }; return fixture; } static get withNoPreDestroyMethodName() { const fixture = { constructorArguments: [], lifecycle: { postConstructMethodNames: new Set(), preDestroyMethodNames: new Set(), }, properties: new Map(), scope: undefined, }; return fixture; } static get withPreDestroyMethodName() { const fixture = { constructorArguments: [], lifecycle: { postConstructMethodNames: new Set(), preDestroyMethodNames: new Set(['preDestroy']), }, properties: new Map(), scope: undefined, }; return fixture; } } //# sourceMappingURL=ClassMetadataFixtures.js.map