Skip to content

Commit 0704322

Browse files
committed
chore: remove tslint type workaround
* 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 262c23b commit 0704322

File tree

4 files changed

+25
-42
lines changed

4 files changed

+25
-42
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: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,31 @@
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 {ENTER, LEFT_ARROW, RIGHT_ARROW, SPACE} from '@angular/cdk/keycodes';
912
import {
13+
ChangeDetectionStrategy,
14+
ChangeDetectorRef,
15+
Component,
16+
ContentChild,
1017
ContentChildren,
18+
Directive,
19+
ElementRef,
1120
EventEmitter,
21+
forwardRef,
22+
Inject,
1223
Input,
24+
OnChanges,
25+
Optional,
1326
Output,
1427
QueryList,
15-
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
19-
ElementRef,
20-
Component,
21-
ContentChild,
22-
ViewChild,
2328
TemplateRef,
29+
ViewChild,
2430
ViewEncapsulation,
25-
Optional,
26-
Inject,
27-
forwardRef,
28-
ChangeDetectionStrategy,
29-
ChangeDetectorRef,
30-
OnChanges,
3131
} from '@angular/core';
32-
import {LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE} from '@angular/cdk/keycodes';
33-
import {CdkStepLabel} from './step-label';
34-
import {coerceBooleanProperty} from '@angular/cdk/coercion';
3532
import {AbstractControl} from '@angular/forms';
36-
import {Direction, Directionality} from '@angular/cdk/bidi';
33+
import {CdkStepLabel} from './step-label';
3734

3835
/** Used to generate unique ID for each stepper component. */
3936
let nextId = 0;

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)