File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -440,6 +440,7 @@ namespace ts.refactor {
440440 switch ( i . kind ) {
441441 case SyntaxKind . ImportDeclaration : {
442442 const clause = i . importClause ;
443+ if ( ! clause ) return undefined ;
443444 const defaultImport = clause . name && keep ( clause . name ) ? clause . name : undefined ;
444445 const namedBindings = clause . namedBindings && filterNamedBindings ( clause . namedBindings , keep ) ;
445446 return defaultImport || namedBindings
Original file line number Diff line number Diff line change 11/// <reference path='fourslash.ts' />
22
33// @Filename : /a.ts
4+ ////import "./foo";
45////import { a, b, alreadyUnused } from "./other";
56////const p = 0;
67////[|const y = p + b;|]
@@ -11,6 +12,7 @@ verify.moveToNewFile({
1112 "/a.ts" :
1213`import { y } from "./y";
1314
15+ import "./foo";
1416import { a, alreadyUnused } from "./other";
1517export const p = 0;
1618a; y;` ,
You can’t perform that action at this time.
0 commit comments