UNPKG

@inversifyjs/core

Version:

InversifyJs core package

47 lines 1.42 kB
import { bindingScopeValues } from '../models/BindingScope.js'; import { bindingTypeValues } from '../models/BindingType.js'; export class InstanceBindingFixtures { static get any() { return { cache: { isRight: false, value: undefined, }, id: 1, implementationType: class Foo { }, isSatisfiedBy: () => true, moduleId: undefined, onActivation: undefined, onDeactivation: undefined, scope: bindingScopeValues.Singleton, serviceIdentifier: 'service-id', type: bindingTypeValues.Instance, }; } static get withScopeSingleton() { return { ...InstanceBindingFixtures.any, scope: bindingScopeValues.Singleton, }; } static get withCacheIsRightAndAsyncValueAndScopeSingleton() { return { ...InstanceBindingFixtures.withScopeSingleton, cache: { isRight: true, value: Promise.resolve({}), }, }; } static get withCacheIsRightAndScopeSingleton() { return { ...InstanceBindingFixtures.withScopeSingleton, cache: { isRight: true, value: {}, }, }; } } //# sourceMappingURL=InstanceBindingFixtures.js.map