Skip to content

Commit 7bcb0d8

Browse files
devversionjelbourn
authored andcommitted
chore: remove tslint type workaround (#8451)
Due to a TSLint issue (palantir/tslint#2470) imports that were used as a type argument were treated as unused. This has been fixed with TypeScript ^2.4.0 and the workaround (using `//tslint:disable` comments) can be removed.
1 parent 40be1f2 commit 7bcb0d8

File tree

4 files changed

+10
-27
lines changed

4 files changed

+10
-27
lines changed

src/cdk/overlay/overlay-directives.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9+
import {Direction, Directionality} from '@angular/cdk/bidi';
10+
import {coerceBooleanProperty} from '@angular/cdk/coercion';
11+
import {ESCAPE} from '@angular/cdk/keycodes';
12+
import {TemplatePortal} from '@angular/cdk/portal';
913
import {
1014
Directive,
1115
ElementRef,
@@ -22,23 +26,16 @@ import {
2226
TemplateRef,
2327
ViewContainerRef,
2428
} from '@angular/core';
25-
import {Direction, Directionality} from '@angular/cdk/bidi';
26-
import {coerceBooleanProperty} from '@angular/cdk/coercion';
27-
import {ESCAPE} from '@angular/cdk/keycodes';
28-
import {TemplatePortal} from '@angular/cdk/portal';
29+
import {Subscription} from 'rxjs/Subscription';
2930
import {Overlay} from './overlay';
30-
import {OverlayRef} from './overlay-ref';
3131
import {OverlayConfig} from './overlay-config';
32+
import {OverlayRef} from './overlay-ref';
3233
import {
33-
// This import is only used to define a generic type. The current TypeScript version incorrectly
34-
// considers such imports as unused (https://github.com/Microsoft/TypeScript/issues/14953)
35-
// tslint:disable-next-line:no-unused-variable
3634
ConnectedOverlayPositionChange,
3735
ConnectionPositionPair,
3836
} from './position/connected-position';
3937
import {ConnectedPositionStrategy} from './position/connected-position-strategy';
4038
import {RepositionScrollStrategy, ScrollStrategy} from './scroll/index';
41-
import {Subscription} from 'rxjs/Subscription';
4239

4340

4441
/** Default set of positions for the overlay. Follows the behavior of a dropdown. */

src/cdk/stepper/stepper.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ import {
1313
Output,
1414
QueryList,
1515
Directive,
16-
// This import is only used to define a generic type. The current TypeScript version incorrectly
17-
// considers such imports as unused (https://github.com/Microsoft/TypeScript/issues/14953)
18-
// tslint:disable-next-line:no-unused-variable
1916
ElementRef,
2017
Component,
2118
ContentChild,

src/demo-app/overlay/overlay-demo.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,8 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {Overlay, CdkOverlayOrigin, OverlayConfig} from '@angular/cdk/overlay';
10-
import {
11-
ComponentPortal,
12-
// This import is only used to define a generic type. The current TypeScript version incorrectly
13-
// considers such imports as unused (https://github.com/Microsoft/TypeScript/issues/14953)
14-
// tslint:disable-next-line:no-unused-variable
15-
Portal,
16-
CdkPortal
17-
} from '@angular/cdk/portal';
9+
import {CdkOverlayOrigin, Overlay, OverlayConfig} from '@angular/cdk/overlay';
10+
import {CdkPortal, ComponentPortal, Portal} from '@angular/cdk/portal';
1811
import {
1912
Component,
2013
QueryList,
@@ -23,8 +16,8 @@ import {
2316
ViewContainerRef,
2417
ViewEncapsulation,
2518
} from '@angular/core';
26-
import 'rxjs/add/operator/filter';
2719
import 'rxjs/add/operator/do';
20+
import 'rxjs/add/operator/filter';
2821

2922

3023
@Component({

tools/dashboard/src/app/dashboard-app.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import {Component} from '@angular/core';
22
import {AngularFireDatabase} from 'angularfire2/database';
33
import {Observable} from 'rxjs/Observable';
4-
5-
// This import is only used to define a generic type. The current TypeScript version incorrectly
6-
// considers such imports as unused (https://github.com/Microsoft/TypeScript/issues/14953)
7-
// tslint:disable-next-line:no-unused-variable
8-
import {PayloadResult, CoverageResult} from './data-definitions';
4+
import {CoverageResult, PayloadResult} from './data-definitions';
95

106
@Component({
117
selector: 'dashboard-app',

0 commit comments

Comments
 (0)