fix(core): export provider interfaces that are part of the public API types (#31377)
Some of the provider interfaces that the [Provider][1] and [StaticProvider][2] types comprise were not exported from [@angular/core][3]. As a result, the docs for these symbols did not appear on angular.io (even though both `Provider` and `StaticProvider` are part of the public API. (See, also, https://github.com/angular/angular/pull/31377#discussion_r299254408.) This commit fixes it by exporting all necessary provider interfaces. [1]: https://github.com/angular/angular/blob/9e34670b2/packages/core/src/di/interface/provider.ts#L365-L366 [2]: https://github.com/angular/angular/blob/9e34670b2/packages/core/src/di/interface/provider.ts#L283-L284 [3]: https://github.com/angular/angular/blob/9e34670b2/packages/core/src/di/index.ts#L23 PR Close #31377
This commit is contained in:

committed by
Jason Aden

parent
4b05ebc804
commit
35f8bfce8b
24
tools/public_api_guard/core/core.d.ts
vendored
24
tools/public_api_guard/core/core.d.ts
vendored
@ -165,6 +165,11 @@ export declare abstract class ComponentRef<C> {
|
||||
abstract onDestroy(callback: Function): void;
|
||||
}
|
||||
|
||||
export interface ConstructorProvider extends ConstructorSansProvider {
|
||||
multi?: boolean;
|
||||
provide: Type<any>;
|
||||
}
|
||||
|
||||
export interface ConstructorSansProvider {
|
||||
deps?: any[];
|
||||
}
|
||||
@ -332,11 +337,20 @@ export interface ExistingProvider extends ExistingSansProvider {
|
||||
provide: any;
|
||||
}
|
||||
|
||||
export interface ExistingSansProvider {
|
||||
useExisting: any;
|
||||
}
|
||||
|
||||
export interface FactoryProvider extends FactorySansProvider {
|
||||
multi?: boolean;
|
||||
provide: any;
|
||||
}
|
||||
|
||||
export interface FactorySansProvider {
|
||||
deps?: any[];
|
||||
useFactory: Function;
|
||||
}
|
||||
|
||||
export declare function forwardRef(forwardRefFn: ForwardRefFn): Type<any>;
|
||||
|
||||
export interface ForwardRefFn {
|
||||
@ -1345,6 +1359,16 @@ export interface SkipSelfDecorator {
|
||||
new (): SkipSelf;
|
||||
}
|
||||
|
||||
export interface StaticClassProvider extends StaticClassSansProvider {
|
||||
multi?: boolean;
|
||||
provide: any;
|
||||
}
|
||||
|
||||
export interface StaticClassSansProvider {
|
||||
deps: any[];
|
||||
useClass: Type<any>;
|
||||
}
|
||||
|
||||
export declare type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider | any[];
|
||||
|
||||
/** @deprecated */
|
||||
|
Reference in New Issue
Block a user