async-injection
Version:
A robust lightweight dependency injection library for TypeScript.
17 lines (16 loc) • 696 B
TypeScript
import { BindableProvider } from './bindable-provider';
import { AsyncFactory } from './binding';
import { InjectableId, Injector } from './injector';
import { State } from './state';
/**
* @inheritDoc
* This specialization invokes it's configured Factory asynchronously and waits until it can provide the result.
*/
export declare class AsyncFactoryBasedProvider<T> extends BindableProvider<T, AsyncFactory<T>> {
constructor(injector: Injector, id: InjectableId<T>, maker: AsyncFactory<T>);
/**
* @inheritDoc
* This specialization invokes it's configured Factory and provides the result (or invokes the error handler if necessary).
*/
provideAsState(): State<T>;
}