refactor: replace any[] with Provider[] where possible
This commit is contained in:

committed by
Victor Berchet

parent
eb7d8c702c
commit
ea2e5521e8
14
tools/public_api_guard/core/index.d.ts
vendored
14
tools/public_api_guard/core/index.d.ts
vendored
@ -294,7 +294,7 @@ export declare class ComponentMetadata extends DirectiveMetadata implements Comp
|
||||
styles: string[];
|
||||
template: string;
|
||||
templateUrl: string;
|
||||
viewProviders: any[];
|
||||
viewProviders: Provider[];
|
||||
constructor({selector, inputs, outputs, host, exportAs, moduleId, providers, viewProviders, changeDetection, queries, templateUrl, template, styleUrls, styles, animations, encapsulation, interpolation, entryComponents}?: ComponentMetadataType);
|
||||
}
|
||||
|
||||
@ -384,7 +384,7 @@ export interface ContentChildrenMetadataFactory {
|
||||
export declare function createPlatform(injector: Injector): PlatformRef;
|
||||
|
||||
/** @experimental */
|
||||
export declare function createPlatformFactory(parentPlaformFactory: PlatformFactory, name: string, providers?: any[]): PlatformFactory;
|
||||
export declare function createPlatformFactory(parentPlaformFactory: PlatformFactory, name: string, providers?: Provider[]): PlatformFactory;
|
||||
|
||||
/** @stable */
|
||||
export declare const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
|
||||
@ -475,7 +475,7 @@ export declare class DirectiveMetadata extends InjectableMetadata implements Dir
|
||||
};
|
||||
inputs: string[];
|
||||
outputs: string[];
|
||||
providers: any[];
|
||||
providers: Provider[];
|
||||
queries: {
|
||||
[key: string]: any;
|
||||
};
|
||||
@ -765,7 +765,7 @@ export declare class ModuleWithComponentFactories<T> {
|
||||
/** @stable */
|
||||
export interface ModuleWithProviders {
|
||||
ngModule: Type<any>;
|
||||
providers?: any[];
|
||||
providers?: Provider[];
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
@ -796,7 +796,7 @@ export declare class NgModuleMetadata extends InjectableMetadata implements NgMo
|
||||
entryComponents: Array<Type<any> | any[]>;
|
||||
exports: Array<Type<any> | any[]>;
|
||||
imports: Array<Type<any> | ModuleWithProviders | any[]>;
|
||||
providers: any[];
|
||||
providers: Provider[];
|
||||
schemas: Array<SchemaMetadata | any[]>;
|
||||
constructor(options?: NgModuleMetadataType);
|
||||
}
|
||||
@ -814,7 +814,7 @@ export interface NgModuleMetadataType {
|
||||
entryComponents?: Array<Type<any> | any[]>;
|
||||
exports?: Array<Type<any> | any[]>;
|
||||
imports?: Array<Type<any> | ModuleWithProviders | any[]>;
|
||||
providers?: any[];
|
||||
providers?: Provider[];
|
||||
schemas?: Array<SchemaMetadata | any[]>;
|
||||
}
|
||||
|
||||
@ -955,7 +955,7 @@ export interface PipeTransform {
|
||||
export declare const PLATFORM_INITIALIZER: any;
|
||||
|
||||
/** @experimental */
|
||||
export declare const platformCore: (extraProviders?: any[]) => PlatformRef;
|
||||
export declare const platformCore: (extraProviders?: (TypeProvider | ValueProvider | ClassProvider | ExistingProvider | FactoryProvider | any[])[]) => PlatformRef;
|
||||
|
||||
/** @stable */
|
||||
export declare abstract class PlatformRef {
|
||||
|
@ -2,10 +2,10 @@
|
||||
export declare function bootstrapWorkerUi(workerScriptUri: string, customProviders?: Provider[]): Promise<PlatformRef>;
|
||||
|
||||
/** @stable */
|
||||
export declare const platformBrowserDynamic: (extraProviders?: any[]) => PlatformRef;
|
||||
export declare const platformBrowserDynamic: (extraProviders?: (TypeProvider | ValueProvider | ClassProvider | ExistingProvider | FactoryProvider | any[])[]) => PlatformRef;
|
||||
|
||||
/** @experimental */
|
||||
export declare const platformWorkerAppDynamic: (extraProviders?: any[]) => PlatformRef;
|
||||
export declare const platformWorkerAppDynamic: (extraProviders?: (TypeProvider | ValueProvider | ClassProvider | ExistingProvider | FactoryProvider | any[])[]) => PlatformRef;
|
||||
|
||||
/** @experimental */
|
||||
export declare const RESOURCE_CACHE_PROVIDER: Provider[];
|
||||
|
@ -3,4 +3,4 @@ export declare class BrowserDynamicTestingModule {
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare const platformBrowserDynamicTesting: (extraProviders?: any[]) => PlatformRef;
|
||||
export declare const platformBrowserDynamicTesting: (extraProviders?: (TypeProvider | ValueProvider | ClassProvider | ExistingProvider | FactoryProvider | any[])[]) => PlatformRef;
|
||||
|
@ -118,13 +118,13 @@ export declare class NgProbeToken {
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare const platformBrowser: (extraProviders?: any[]) => PlatformRef;
|
||||
export declare const platformBrowser: (extraProviders?: (TypeProvider | ValueProvider | ClassProvider | ExistingProvider | FactoryProvider | any[])[]) => PlatformRef;
|
||||
|
||||
/** @experimental */
|
||||
export declare const platformWorkerApp: (extraProviders?: any[]) => PlatformRef;
|
||||
export declare const platformWorkerApp: (extraProviders?: (TypeProvider | ValueProvider | ClassProvider | ExistingProvider | FactoryProvider | any[])[]) => PlatformRef;
|
||||
|
||||
/** @experimental */
|
||||
export declare const platformWorkerUi: (extraProviders?: any[]) => PlatformRef;
|
||||
export declare const platformWorkerUi: (extraProviders?: (TypeProvider | ValueProvider | ClassProvider | ExistingProvider | FactoryProvider | any[])[]) => PlatformRef;
|
||||
|
||||
/** @experimental */
|
||||
export declare const PRIMITIVE: Type<any>;
|
||||
|
@ -3,4 +3,4 @@ export declare class BrowserTestingModule {
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare const platformBrowserTesting: (extraProviders?: any[]) => PlatformRef;
|
||||
export declare const platformBrowserTesting: (extraProviders?: (TypeProvider | ValueProvider | ClassProvider | ExistingProvider | FactoryProvider | any[])[]) => PlatformRef;
|
||||
|
@ -1,8 +1,8 @@
|
||||
/** @experimental */
|
||||
export declare const platformDynamicServer: (extraProviders?: any[]) => PlatformRef;
|
||||
export declare const platformDynamicServer: (extraProviders?: (TypeProvider | ValueProvider | ClassProvider | ExistingProvider | FactoryProvider | any[])[]) => PlatformRef;
|
||||
|
||||
/** @experimental */
|
||||
export declare const platformServer: (extraProviders?: any[]) => PlatformRef;
|
||||
export declare const platformServer: (extraProviders?: (TypeProvider | ValueProvider | ClassProvider | ExistingProvider | FactoryProvider | any[])[]) => PlatformRef;
|
||||
|
||||
/** @experimental */
|
||||
export declare class ServerModule {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/** @experimental */
|
||||
export declare const platformServerTesting: (extraProviders?: any[]) => PlatformRef;
|
||||
export declare const platformServerTesting: (extraProviders?: (TypeProvider | ValueProvider | ClassProvider | ExistingProvider | FactoryProvider | any[])[]) => PlatformRef;
|
||||
|
||||
/** @experimental */
|
||||
export declare class ServerTestingModule {
|
||||
|
Reference in New Issue
Block a user