@@ -80,14 +80,14 @@ namespace ts.codefix {
80
80
81
81
// handle case where 'import a = A;'
82
82
case SyntaxKind . ImportEqualsDeclaration :
83
- let importEquals = findImportDeclaration ( token ) ;
83
+ const importEquals = findImportDeclaration ( token ) ;
84
84
return createCodeFix ( "" , importEquals . pos , importEquals . end - importEquals . pos ) ;
85
85
86
86
case SyntaxKind . ImportSpecifier :
87
87
const namedImports = < NamedImports > token . parent . parent ;
88
88
if ( namedImports . elements . length === 1 ) {
89
89
// Only 1 import and it is unused. So the entire declaration should be removed.
90
- let importSpec = findImportDeclaration ( token ) ;
90
+ const importSpec = findImportDeclaration ( token ) ;
91
91
return createCodeFix ( "" , importSpec . pos , importSpec . end - importSpec . pos ) ;
92
92
}
93
93
else {
@@ -108,10 +108,11 @@ namespace ts.codefix {
108
108
109
109
case SyntaxKind . NamespaceImport :
110
110
const namespaceImport = < NamespaceImport > token . parent ;
111
- if ( namespaceImport . name == token && ! ( < ImportClause > namespaceImport . parent ) . name ) {
111
+ if ( namespaceImport . name == token && ! ( < ImportClause > namespaceImport . parent ) . name ) {
112
112
const importDecl = findImportDeclaration ( namespaceImport ) ;
113
113
return createCodeFix ( "" , importDecl . pos , importDecl . end - importDecl . pos ) ;
114
- } else {
114
+ }
115
+ else {
115
116
const start = ( < ImportClause > namespaceImport . parent ) . name . end ;
116
117
return createCodeFix ( "" , start , ( < ImportClause > namespaceImport . parent ) . namedBindings . end - start ) ;
117
118
}
@@ -163,20 +164,4 @@ namespace ts.codefix {
163
164
}
164
165
}
165
166
} ) ;
166
- }
167
-
168
- const s = "hello" ;
169
-
170
- class C {
171
-
172
-
173
-
174
- private [ "string" ] : string ;
175
- private "b iz" : string ;
176
-
177
- bar ( ) {
178
- this
179
- }
180
- }
181
-
182
-
167
+ }
0 commit comments