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) • 410 B
TypeScript
import { DependencyKey } from '../container/IContainer';
import { InjectionToken } from './InjectionToken';
import { InjectFn } from '../hooks/hook';
import { type constructor } from '../utils/basic';
export declare const toToken: <T = any>(token: InjectFn<T> | InjectionToken<T> | DependencyKey | constructor<T>) => InjectionToken<T>;
export declare const argToToken: (v: unknown) => InjectionToken<unknown>;