(sourceFile, symbolToken, symbolName, program)
| 153579 | return { fixes: fixes, symbolName: symbolName, errorIdentifierText: symbolToken.text }; |
| 153580 | } |
| 153581 | function getTypeOnlyPromotionFix(sourceFile, symbolToken, symbolName, program) { |
| 153582 | var checker = program.getTypeChecker(); |
| 153583 | var symbol = checker.resolveName(symbolName, symbolToken, 111551 /* SymbolFlags.Value */, /*excludeGlobals*/ true); |
| 153584 | if (!symbol) |
| 153585 | return undefined; |
| 153586 | var typeOnlyAliasDeclaration = checker.getTypeOnlyAliasDeclaration(symbol); |
| 153587 | if (!typeOnlyAliasDeclaration || ts.getSourceFileOfNode(typeOnlyAliasDeclaration) !== sourceFile) |
| 153588 | return undefined; |
| 153589 | return { kind: 4 /* ImportFixKind.PromoteTypeOnly */, typeOnlyAliasDeclaration: typeOnlyAliasDeclaration }; |
| 153590 | } |
| 153591 | function getSymbolName(sourceFile, checker, symbolToken, compilerOptions) { |
| 153592 | var parent = symbolToken.parent; |
| 153593 | if ((ts.isJsxOpeningLikeElement(parent) || ts.isJsxClosingElement(parent)) && parent.tagName === symbolToken && ts.jsxModeNeedsExplicitImport(compilerOptions.jsx)) { |
no outgoing calls
no test coverage detected