@@ -24,15 +24,13 @@ namespace ts.codefix {
24
24
moduleSpecifier ?: string ;
25
25
}
26
26
27
- interface SymbolContext {
27
+ interface SymbolContext extends textChanges . TextChangesContext {
28
28
sourceFile : SourceFile ;
29
29
symbolName : string ;
30
- formatContext : ts . formatting . FormatContext ;
31
30
}
32
31
33
32
interface ImportCodeFixContext extends SymbolContext {
34
33
symbolToken : Identifier | undefined ;
35
- host : LanguageServiceHost ;
36
34
program : Program ;
37
35
checker : TypeChecker ;
38
36
compilerOptions : CompilerOptions ;
@@ -257,7 +255,7 @@ namespace ts.codefix {
257
255
}
258
256
}
259
257
260
- function getCodeActionForNewImport ( context : SymbolContext & textChanges . TextChangesContext & { kind : ImportKind } , moduleSpecifier : string ) : ImportCodeAction {
258
+ function getCodeActionForNewImport ( context : SymbolContext & { kind : ImportKind } , moduleSpecifier : string ) : ImportCodeAction {
261
259
const { kind, sourceFile, symbolName } = context ;
262
260
const lastImportDeclaration = findLast ( sourceFile . statements , isAnyImportSyntax ) ;
263
261
@@ -669,7 +667,7 @@ namespace ts.codefix {
669
667
return expression && isStringLiteral ( expression ) ? expression . text : undefined ;
670
668
}
671
669
672
- function tryUpdateExistingImport ( context : SymbolContext & textChanges . TextChangesContext & { kind : ImportKind } , importClause : ImportClause | ImportEqualsDeclaration ) : FileTextChanges [ ] | undefined {
670
+ function tryUpdateExistingImport ( context : SymbolContext & { kind : ImportKind } , importClause : ImportClause | ImportEqualsDeclaration ) : FileTextChanges [ ] | undefined {
673
671
const { symbolName, sourceFile, kind } = context ;
674
672
const { name } = importClause ;
675
673
const { namedBindings } = importClause . kind !== SyntaxKind . ImportEqualsDeclaration && importClause ;
@@ -706,7 +704,7 @@ namespace ts.codefix {
706
704
}
707
705
}
708
706
709
- function getCodeActionForUseExistingNamespaceImport ( namespacePrefix : string , context : SymbolContext & textChanges . TextChangesContext , symbolToken : Identifier ) : ImportCodeAction {
707
+ function getCodeActionForUseExistingNamespaceImport ( namespacePrefix : string , context : SymbolContext , symbolToken : Identifier ) : ImportCodeAction {
710
708
const { symbolName, sourceFile } = context ;
711
709
712
710
/**
0 commit comments