@@ -80,14 +80,14 @@ namespace ts.codefix {
8080
8181 // handle case where 'import a = A;'
8282 case SyntaxKind . ImportEqualsDeclaration :
83- let importEquals = findImportDeclaration ( token ) ;
83+ const importEquals = findImportDeclaration ( token ) ;
8484 return createCodeFix ( "" , importEquals . pos , importEquals . end - importEquals . pos ) ;
8585
8686 case SyntaxKind . ImportSpecifier :
8787 const namedImports = < NamedImports > token . parent . parent ;
8888 if ( namedImports . elements . length === 1 ) {
8989 // Only 1 import and it is unused. So the entire declaration should be removed.
90- let importSpec = findImportDeclaration ( token ) ;
90+ const importSpec = findImportDeclaration ( token ) ;
9191 return createCodeFix ( "" , importSpec . pos , importSpec . end - importSpec . pos ) ;
9292 }
9393 else {
@@ -108,10 +108,11 @@ namespace ts.codefix {
108108
109109 case SyntaxKind . NamespaceImport :
110110 const namespaceImport = < NamespaceImport > token . parent ;
111- if ( namespaceImport . name == token && ! ( < ImportClause > namespaceImport . parent ) . name ) {
111+ if ( namespaceImport . name == token && ! ( < ImportClause > namespaceImport . parent ) . name ) {
112112 const importDecl = findImportDeclaration ( namespaceImport ) ;
113113 return createCodeFix ( "" , importDecl . pos , importDecl . end - importDecl . pos ) ;
114- } else {
114+ }
115+ else {
115116 const start = ( < ImportClause > namespaceImport . parent ) . name . end ;
116117 return createCodeFix ( "" , start , ( < ImportClause > namespaceImport . parent ) . namedBindings . end - start ) ;
117118 }
@@ -163,20 +164,4 @@ namespace ts.codefix {
163164 }
164165 }
165166 } ) ;
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