import { FactoryProvider } from '@angular/core'; import { Native } from '../types/abstraction'; import { FactoryGeneratorConfig } from './common'; declare type NativeFactory = (...deps: any[]) => TNative; /** * Defines the configuration for a function that generates a `FactoryProvider` for native objects. * * @export * @interface NativeFactoryGeneratorConfig * @extends {FactoryGeneratorConfig} */ export interface NativeFactoryGeneratorConfig extends FactoryGeneratorConfig { } /** * Applies default values for undefined values in the config object. * * @export * @param {NativeFactoryGeneratorConfig} config The optional config. * @returns {Required} The filled config. */ export declare function configNativeFactoryProviderGeneratorDefaults(config: NativeFactoryGeneratorConfig): Required; /** * Creates a factory provider for the a natve object injection token. * The factory runs the specified function and passes the specified dependencies to it. * The function will be run outside Angular. * * By default, the generator will create the factory provider for the `NativeInstance` token. * To change this behavior, specify the appropriate token in the config argument. * * Note: The factory will detect non-browser platforms and return `null` instead of calling the function. * * @export * @template TNative The type of native object generated by the factory. * @param {NativeFactory} produceNative The function that will create the native object. Receives the dependencies specified in `deps`. * @param {NativeFactoryGeneratorConfig} [config={}] (Optional) A configuration object for the generator. * @returns {FactoryProvider} A `FactoryProvider` object for the specified token. */ export declare function createNativeFactoryProvider(produceNative: NativeFactory, config?: NativeFactoryGeneratorConfig): FactoryProvider; export {};