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.

7 lines (6 loc) 422 B
import { DependencyKey } from '../container/IContainer.js'; import { InjectionToken } from './InjectionToken.js'; import { InjectFn } from '../hooks/hook.js'; import { type constructor } from '../utils/basic.js'; export declare const toToken: <T = any>(token: InjectFn<T> | InjectionToken<T> | DependencyKey | constructor<T>) => InjectionToken<T>; export declare const argToToken: (v: unknown) => InjectionToken<unknown>;