UNPKG

ts-ioc-container

Version:

Fast, lightweight TypeScript dependency injection container with a clean API, scoped lifecycles, decorators, tokens, hooks, lazy injection, customizable providers, and no global container objects.

22 lines (21 loc) 590 B
import { InjectionToken } from './InjectionToken'; import { MethodNotImplementedError } from '../errors/MethodNotImplementedError'; export class ConstantToken extends InjectionToken { token; constructor(token) { super(); this.token = token; } resolve(s) { return this.token; } args(...deps) { throw new MethodNotImplementedError('not implemented'); } argsFn(getArgsFn) { throw new MethodNotImplementedError('not implemented'); } lazy() { throw new MethodNotImplementedError('not implemented'); } }