feat(core): Deprecate TestBed.get as deprecated (#32406)
From 9.0.0 use TestBed.inject See #32200 Fixes #26491 PR Close #32406
This commit is contained in:

committed by
Matias Niemelä

parent
5356826a38
commit
a85eccd6ff
8
tools/public_api_guard/core/testing.d.ts
vendored
8
tools/public_api_guard/core/testing.d.ts
vendored
@ -58,8 +58,8 @@ export interface TestBed {
|
||||
configureTestingModule(moduleDef: TestModuleMetadata): void;
|
||||
createComponent<T>(component: Type<T>): ComponentFixture<T>;
|
||||
execute(tokens: any[], fn: Function, context?: any): any;
|
||||
get(token: any, notFoundValue?: any): any;
|
||||
get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): any;
|
||||
/** @deprecated */ get(token: any, notFoundValue?: any): any;
|
||||
/** @deprecated */ get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): any;
|
||||
initTestEnvironment(ngModule: Type<any> | Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): void;
|
||||
inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue?: T, flags?: InjectFlags): T;
|
||||
inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue: null, flags?: InjectFlags): T | null;
|
||||
@ -95,8 +95,8 @@ export interface TestBedStatic {
|
||||
}): TestBedStatic;
|
||||
configureTestingModule(moduleDef: TestModuleMetadata): TestBedStatic;
|
||||
createComponent<T>(component: Type<T>): ComponentFixture<T>;
|
||||
get(token: any, notFoundValue?: any): any;
|
||||
get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): any;
|
||||
/** @deprecated */ get(token: any, notFoundValue?: any): any;
|
||||
/** @deprecated */ get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): any;
|
||||
initTestEnvironment(ngModule: Type<any> | Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): TestBed;
|
||||
inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue: null, flags?: InjectFlags): T | null;
|
||||
inject<T>(token: Type<T> | InjectionToken<T> | AbstractType<T>, notFoundValue?: T, flags?: InjectFlags): T;
|
||||
|
Reference in New Issue
Block a user