import { Newable, Injectable, AttributedInjectable, MetadataDictionary, Lazy } from "./types"; export { Newable, Injectable, AttributedInjectable, MetadataDictionary, Lazy }; /** * Resolves an export for a given symbol. * * @typeparam T The function or class type which is required. * @param symbol The symbol for which an export is required. * * @returns The function, or object instance of type _T_, that is satisfied by _symbol_. * @throws An error if no exports were found for _symbol_, or if more than one export can satisfy the * required symbol. */ export declare function inject(symbol: Symbol): T; /** * Resolves an export for a given symbol. * * @typeparam T The function or class type which is required. * @param symbol The symbol for which an export is required. * @param metadata Metadata properties that can be used to reduce the exports that will satisfy _symbol_. * * @returns The function, or object instance of type _T_, that is satisfied by _symbol_. * @throws An error if no exports were found for _symbol_, or if more than one export can satisfy the * required symbol. */ export declare function inject(symbol: Symbol, metadata: Partial): T; /** * Lazingly resolves an export for a given symbol. * * @typeparam T The function or class type which is required. * @param symbol The symbol for which an export is required. * * @returns The function, or object instance of type _T_, along with it's metadata that is satisfied by _symbol_. * @throws An error if no exports were found for _symbol_, or if more than one export can satisfy the * required symbol. */ export declare function lazyInject(symbol: Symbol): Lazy; /** * Lazngly resolves an export for a given symbol. * * @typeparam T The function or class type which is required. * @param symbol The symbol for which an export is required. * @param metadata Metadata properties that can be used to reduce the exports that will satisfy _symbol_. * * @returns The function, or object instance of type _T_, along with it's metadata that is satisfied by _symbol_. * @throws An error if no exports were found for _symbol_, or if more than one export can satisfy the * required symbol. */ export declare function lazyInject(symbol: Symbol, metadata?: TMetadata): Lazy; /** * Lazingly resolves a collection of exports for a given symbol. * * @typeparam T The function or class type which is required. * @param symbol The symbol for which an export is required. * * @returns The function, or object instance of type _T_, along with it's metadata that is satisfied by _symbol_. * @throws An error if no exports were found for _symbol_, or if more than one export can satisfy the * required symbol. */ export declare function lazyInjectMany(symbol: Symbol): Lazy[]; /** * Lazingly resolves a collection of exports for a given symbol. * * @typeparam T The function or class type which is required. * @param symbol The symbol for which an export is required. * @param metadata Metadata properties that can be used to reduce the exports that will satisfy _symbol_. * * @returns The function, or object instance of type _T_, along with it's metadata that is satisfied by _symbol_. * @throws An error if no exports were found for _symbol_, or if more than one export can satisfy the * required symbol. */ export declare function lazyInjectMany(symbol: Symbol, metadata?: TMetadata): Lazy[]; /** * Creates an export factory function that returns a new instance of a class type each time it * is invoked. * * @typeparam T The class type. * @param target The constructor for _T_ for which an instance should be created. * * @returns A function. */ export declare function instanceOf(target: Newable): Function; /** * Creates an export factory function that returns a specified instance of a class type each time it * is invoked. * * @typeparam T The class type. * @param instance The instance of _T_ which should be returned. * * @returns A function. */ export declare function givenInstanceOf(instance: T): Function; /** * Creates an export factory function that returns a singleton instance of a class type each time it * is invoked. * * @typeparam T The class type. * @param target The constructor for _T_ for which an singleton instance should be created. * * @returns A function. */ export declare function singletonOf(target: Newable): Function; /** * Registers an exported value for injection. * * @typeparam T The function or class type which is to be exported. * @param symbol The symbol for which the export should be registered. * @param target The exported value that will be used to satisfy _symbol_. */ export declare function injectFor(symbol: Symbol, target: Injectable | AttributedInjectable): void;