diff --git a/packages/core/testing/src/r3_test_bed.ts b/packages/core/testing/src/r3_test_bed.ts index 88b97e174d..e754568142 100644 --- a/packages/core/testing/src/r3_test_bed.ts +++ b/packages/core/testing/src/r3_test_bed.ts @@ -162,11 +162,11 @@ export class TestBedRender3 implements TestBed { return _getTestBedRender3().inject(token, notFoundValue, flags); } - /** TODO(goodwine): Mark as deprecated from v9.0.0 use TestBed.inject */ + /** @deprecated from v9.0.0 use TestBed.inject */ static get(token: Type|InjectionToken, notFoundValue?: T, flags?: InjectFlags): any; - /** TODO(goodwine): Mark as deprecated from v9.0.0 use TestBed.inject */ + /** @deprecated from v9.0.0 use TestBed.inject */ static get(token: any, notFoundValue?: any): any; - /** TODO(goodwine): Mark as deprecated from v9.0.0 use TestBed.inject */ + /** @deprecated from v9.0.0 use TestBed.inject */ static get( token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND, flags: InjectFlags = InjectFlags.Default): any { @@ -271,11 +271,11 @@ export class TestBedRender3 implements TestBed { return result === UNDEFINED ? this.compiler.injector.get(token, notFoundValue, flags) : result; } - /** TODO(goodwine): Mark as deprecated from v9.0.0 use TestBed.inject */ + /** @deprecated from v9.0.0 use TestBed.inject */ get(token: Type|InjectionToken, notFoundValue?: T, flags?: InjectFlags): any; - /** TODO(goodwine): Mark as deprecated from v9.0.0 use TestBed.inject */ + /** @deprecated from v9.0.0 use TestBed.inject */ get(token: any, notFoundValue?: any): any; - /** TODO(goodwine): Mark as deprecated from v9.0.0 use TestBed.inject */ + /** @deprecated from v9.0.0 use TestBed.inject */ get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND, flags: InjectFlags = InjectFlags.Default): any { return this.inject(token, notFoundValue, flags); diff --git a/packages/core/testing/src/test_bed.ts b/packages/core/testing/src/test_bed.ts index 6ee828b8e5..cb28df7e2e 100644 --- a/packages/core/testing/src/test_bed.ts +++ b/packages/core/testing/src/test_bed.ts @@ -62,9 +62,9 @@ export interface TestBed { token: Type|InjectionToken|AbstractType, notFoundValue: null, flags?: InjectFlags): T |null; - /** TODO(goodwine): Mark as deprecated from v9.0.0 use TestBed.inject */ + /** @deprecated from v9.0.0 use TestBed.inject */ get(token: Type|InjectionToken, notFoundValue?: T, flags?: InjectFlags): any; - /** TODO(goodwine): Mark as deprecated from v9.0.0 use TestBed.inject */ + /** @deprecated from v9.0.0 use TestBed.inject */ get(token: any, notFoundValue?: any): any; execute(tokens: any[], fn: Function, context?: any): any; @@ -226,14 +226,14 @@ export class TestBedViewEngine implements TestBed { return _getTestBedViewEngine().inject(token, notFoundValue, flags); } - /** TODO(goodwine): Mark as deprecated from v9.0.0 use TestBed.inject */ + /** @deprecated from v9.0.0 use TestBed.inject */ static get(token: Type|InjectionToken, notFoundValue?: T, flags?: InjectFlags): any; /** - * TODO(goodwine): Mark as deprecated from v9.0.0 use TestBed.inject + * @deprecated from v9.0.0 use TestBed.inject * @suppress {duplicate} */ static get(token: any, notFoundValue?: any): any; - /** TODO(goodwine): Mark as deprecated from v9.0.0 use TestBed.inject */ + /** @deprecated from v9.0.0 use TestBed.inject */ static get( token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND, flags: InjectFlags = InjectFlags.Default): any { @@ -483,11 +483,11 @@ export class TestBedViewEngine implements TestBed { return result === UNDEFINED ? this._compiler.injector.get(token, notFoundValue, flags) : result; } - /** TODO(goodwine): Mark as deprecated from v9.0.0 use TestBed.inject */ + /** @deprecated from v9.0.0 use TestBed.inject */ get(token: Type|InjectionToken, notFoundValue?: T, flags?: InjectFlags): any; - /** TODO(goodwine): Mark as deprecated from v9.0.0 use TestBed.inject */ + /** @deprecated from v9.0.0 use TestBed.inject */ get(token: any, notFoundValue?: any): any; - /** TODO(goodwine): Mark as deprecated from v9.0.0 use TestBed.inject */ + /** @deprecated from v9.0.0 use TestBed.inject */ get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND, flags: InjectFlags = InjectFlags.Default): any { return this.inject(token, notFoundValue, flags); diff --git a/packages/core/testing/src/test_bed_common.ts b/packages/core/testing/src/test_bed_common.ts index 764000075f..071179a1b0 100644 --- a/packages/core/testing/src/test_bed_common.ts +++ b/packages/core/testing/src/test_bed_common.ts @@ -120,9 +120,9 @@ export interface TestBedStatic { token: Type|InjectionToken|AbstractType, notFoundValue: null, flags?: InjectFlags): T |null; - /** TODO(goodwine): Mark as deprecated from v9.0.0 use TestBed.inject */ + /** @deprecated from v9.0.0 use TestBed.inject */ get(token: Type|InjectionToken, notFoundValue?: T, flags?: InjectFlags): any; - /** TODO(goodwine): Mark as deprecated from v9.0.0 use TestBed.inject */ + /** @deprecated from v9.0.0 use TestBed.inject */ get(token: any, notFoundValue?: any): any; createComponent(component: Type): ComponentFixture; diff --git a/tools/public_api_guard/core/testing.d.ts b/tools/public_api_guard/core/testing.d.ts index ffc1679f14..e502c94f0d 100644 --- a/tools/public_api_guard/core/testing.d.ts +++ b/tools/public_api_guard/core/testing.d.ts @@ -58,8 +58,8 @@ export interface TestBed { configureTestingModule(moduleDef: TestModuleMetadata): void; createComponent(component: Type): ComponentFixture; execute(tokens: any[], fn: Function, context?: any): any; - get(token: any, notFoundValue?: any): any; - get(token: Type | InjectionToken, notFoundValue?: T, flags?: InjectFlags): any; + /** @deprecated */ get(token: any, notFoundValue?: any): any; + /** @deprecated */ get(token: Type | InjectionToken, notFoundValue?: T, flags?: InjectFlags): any; initTestEnvironment(ngModule: Type | Type[], platform: PlatformRef, aotSummaries?: () => any[]): void; inject(token: Type | InjectionToken | AbstractType, notFoundValue?: T, flags?: InjectFlags): T; inject(token: Type | InjectionToken | AbstractType, notFoundValue: null, flags?: InjectFlags): T | null; @@ -95,8 +95,8 @@ export interface TestBedStatic { }): TestBedStatic; configureTestingModule(moduleDef: TestModuleMetadata): TestBedStatic; createComponent(component: Type): ComponentFixture; - get(token: any, notFoundValue?: any): any; - get(token: Type | InjectionToken, notFoundValue?: T, flags?: InjectFlags): any; + /** @deprecated */ get(token: any, notFoundValue?: any): any; + /** @deprecated */ get(token: Type | InjectionToken, notFoundValue?: T, flags?: InjectFlags): any; initTestEnvironment(ngModule: Type | Type[], platform: PlatformRef, aotSummaries?: () => any[]): TestBed; inject(token: Type | InjectionToken | AbstractType, notFoundValue: null, flags?: InjectFlags): T | null; inject(token: Type | InjectionToken | AbstractType, notFoundValue?: T, flags?: InjectFlags): T;