UNPKG

@akala/core

Version:
17 lines (16 loc) 1.27 kB
import { Injector, Injectable, Injected, InjectableAsync } from './injector'; export declare function resolve<T = any>(name: string): T; export declare function unregister(name: string): void; export declare function merge(i: Injector): void; export declare function inspect(): void; export declare function inject<T>(injectable: Injectable<T>): Injected<T>; export declare function inject<T>(...toInject: string[]): (b: TypedPropertyDescriptor<T>) => void; export declare function exec<T>(...toInject: string[]): (f: Injectable<T>) => T; export declare function injectNew<T>(a: Injectable<T>): Injected<unknown>; export declare function injectWithName<T>(toInject: string[], a: Injectable<T>): Injected<T>; export declare function injectNewWithName(toInject: string[], a: Function): Injected<unknown>; export declare function resolveAsync<T = any>(name: string): T | PromiseLike<T>; export declare function onResolve<T = any>(name: string): PromiseLike<T>; export declare function injectWithNameAsync<T>(toInject: string[], a: InjectableAsync<T> | Injectable<T>): PromiseLike<T>; export declare function register<T>(name: string, value: T, override?: boolean): T; export declare function registerFactory<T>(name: string, value: () => T, override?: boolean): () => T;