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.

14 lines (13 loc) 450 B
import { ContainerError } from './ContainerError'; export class CannonSingletonApplyTwiceError extends ContainerError { name = 'CannonSingletonApplyTwiceError'; constructor(message) { super(message); Object.setPrototypeOf(this, CannonSingletonApplyTwiceError.prototype); } static assert(isTrue, failMessage) { if (!isTrue) { throw new CannonSingletonApplyTwiceError(failMessage); } } }