Skip to content

Commit 561e01d

Browse files
cexbrayatjasonaden
authored andcommittedMay 21, 2019
fix(core): temporarily remove @deprecated jsdoc tag for a TextBed.get overload (#30514)
PR #29290 introduced a new `TestBed.get` signature and deprecated the existing one. This raises a lot of TSLint deprecation warnings in projects using a strict TS config (see #29905 for context), so we are temporarily removing the `@deprecated` annotation in favor of a plain text warning until we properly fix it. Refs #29905 Fixes FW-1336 PR Close #30514
1 parent d1345c7 commit 561e01d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed
 

‎packages/core/testing/src/test_bed.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,14 @@ export interface TestBed {
5757
compileComponents(): Promise<any>;
5858

5959
get<T>(token: Type<T>|InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): any;
60+
61+
// TODO: switch back to official deprecation marker once TSLint issue is resolved
62+
// https://github.com/palantir/tslint/issues/4522
6063
/**
61-
* @deprecated from v8.0.0 use Type<T> or InjectionToken<T>
64+
* deprecated from v8.0.0 use Type<T> or InjectionToken<T>
65+
* This does not use the deprecated jsdoc tag on purpose
66+
* because it renders all overloads as deprecated in TSLint
67+
* due to https://github.com/palantir/tslint/issues/4522.
6268
*/
6369
get(token: any, notFoundValue?: any): any;
6470

‎tools/public_api_guard/core/testing.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export interface TestBed {
5959
createComponent<T>(component: Type<T>): ComponentFixture<T>;
6060
execute(tokens: any[], fn: Function, context?: any): any;
6161
get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): any;
62-
/** @deprecated */ get(token: any, notFoundValue?: any): any;
62+
get(token: any, notFoundValue?: any): any;
6363
initTestEnvironment(ngModule: Type<any> | Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): void;
6464
overrideComponent(component: Type<any>, override: MetadataOverride<Component>): void;
6565
overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): void;

0 commit comments

Comments
 (0)
Please sign in to comment.