File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -440,6 +440,7 @@ namespace ts.refactor {
440
440
switch ( i . kind ) {
441
441
case SyntaxKind . ImportDeclaration : {
442
442
const clause = i . importClause ;
443
+ if ( ! clause ) return undefined ;
443
444
const defaultImport = clause . name && keep ( clause . name ) ? clause . name : undefined ;
444
445
const namedBindings = clause . namedBindings && filterNamedBindings ( clause . namedBindings , keep ) ;
445
446
return defaultImport || namedBindings
Original file line number Diff line number Diff line change 1
1
/// <reference path='fourslash.ts' />
2
2
3
3
// @Filename : /a.ts
4
+ ////import "./foo";
4
5
////import { a, b, alreadyUnused } from "./other";
5
6
////const p = 0;
6
7
////[|const y = p + b;|]
@@ -11,6 +12,7 @@ verify.moveToNewFile({
11
12
"/a.ts" :
12
13
`import { y } from "./y";
13
14
15
+ import "./foo";
14
16
import { a, alreadyUnused } from "./other";
15
17
export const p = 0;
16
18
a; y;` ,
You can’t perform that action at this time.
0 commit comments