Home
last modified time | relevance | path

Searched refs:importDecl (Results 1 – 16 of 16) sorted by relevance

/third_party/typescript/src/services/refactors/
DconvertImport.ts63 …const importDecl = considerPartialSpans ? findAncestor(token, isImportDeclaration) : getParentNode… constant
64 …if (!importDecl || !isImportDeclaration(importDecl)) return { error: "Selection is not an import d…
67 const nextToken = findNextToken(importDecl, importDecl.parent, file);
70 const { importClause } = importDecl;
141 const importDecl = toConvert.parent.parent; constant
144 …changes.insertNodeAfter(sourceFile, importDecl, updateImport(importDecl, /*defaultImportName*/ und…
147 …changes.replaceNode(sourceFile, importDecl, updateImport(importDecl, usedAsNamespaceOrDefault ? fa…
161 const importDecl = toConvert.parent.parent; constant
162 const { moduleSpecifier } = importDecl;
217 …changes.insertNodeAfter(sourceFile, toConvert.parent.parent, updateImport(importDecl, /*defaultImp…
DmoveToNewFile.ts354 …function deleteUnusedImports(sourceFile: SourceFile, importDecl: SupportedImport, changes: textCha…
355 switch (importDecl.kind) {
357 deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnused);
360 if (isUnused(importDecl.name)) {
361 changes.delete(sourceFile, importDecl);
365 deleteUnusedImportsInVariableDeclaration(sourceFile, importDecl, changes, isUnused);
368 …Debug.assertNever(importDecl, `Unexpected import decl kind ${(importDecl as SupportedImport).kind}…
371 …function deleteUnusedImportsInDeclaration(sourceFile: SourceFile, importDecl: ImportDeclaration, c…
372 if (!importDecl.importClause) return;
373 const { name, namedBindings } = importDecl.importClause;
[all …]
/third_party/typescript/src/services/
DorganizeImports.ts73 … ? group(oldImportDecls, importDecl => getExternalModuleName(importDecl.moduleSpecifier!)!)
158 for (const importDecl of oldImports) { constant
159 const { importClause, moduleSpecifier } = importDecl;
163 usedImports.push(importDecl);
193 usedImports.push(updateImportDeclarationAndClause(importDecl, name, namedBindings));
200 importDecl.modifiers,
209 usedImports.push(importDecl);
295 const importDecl = defaultImports.length > 0 constant
312 … updateImportDeclarationAndClause(importDecl, newDefaultImport, /*namedBindings*/ undefined));
314 …updateImportDeclarationAndClause(namedImports[0] ?? importDecl, /*name*/ undefined, newNamedImport…
[all …]
DimportTracker.ts393 forEachImport(sourceFile, (importDecl, moduleSpecifier) => {
401 imports.push(importDecl);
DtextChanges.ts1554 const importDecl = getAncestor(node, SyntaxKind.ImportDeclaration)!; constant
1555 deleteNode(changes, sourceFile, importDecl);
/third_party/typescript/src/services/codefixes/
DfixUnusedIdentifier.ts33 const importDecl = tryGetFullImport(token); constant
34 if (importDecl) {
35 … const changes = textChanges.ChangeTracker.with(context, t => t.delete(sourceFile, importDecl));
36 …xName, changes, [Diagnostics.Remove_import_from_0, showModuleSpecifier(importDecl)], fixIdDeleteIm…
104 const importDecl = tryGetFullImport(token); constant
105 if (importDecl) {
106 changes.delete(sourceFile, importDecl);
/third_party/typescript/tests/baselines/reference/
DparserRealSource7.js155 var importDecl = <ImportDeclaration>ast; variable
156 var isExported = hasFlag(importDecl.varFlags, VarFlags.Exported);
159 …var aliasedModSymbol = findSymbolFromAlias(importDecl.alias, { topLevelScope: scopeChain, members:…
170 typeSymbol = new TypeSymbol(importDecl.id.text, importDecl.minChar,
173 typeSymbol.aliasLink = importDecl;
178 typeSymbol.declAST = importDecl;
179 importDecl.id.sym = typeSymbol;
962 var importDecl = ast;
963 var isExported = hasFlag(importDecl.varFlags, VarFlags.Exported);
965 …var aliasedModSymbol = findSymbolFromAlias(importDecl.alias, { topLevelScope: scopeChain, members:…
[all …]
DparserRealSource7.symbols433 var importDecl = <ImportDeclaration>ast;
434 >importDecl : Symbol(importDecl, Decl(parserRealSource7.ts, 153, 11))
438 var isExported = hasFlag(importDecl.varFlags, VarFlags.Exported);
440 >importDecl : Symbol(importDecl, Decl(parserRealSource7.ts, 153, 11))
443 …var aliasedModSymbol = findSymbolFromAlias(importDecl.alias, { topLevelScope: scopeChain, members:…
446 >importDecl : Symbol(importDecl, Decl(parserRealSource7.ts, 153, 11))
475 typeSymbol = new TypeSymbol(importDecl.id.text, importDecl.minChar,
477 >importDecl : Symbol(importDecl, Decl(parserRealSource7.ts, 153, 11))
478 >importDecl : Symbol(importDecl, Decl(parserRealSource7.ts, 153, 11))
484 typeSymbol.aliasLink = importDecl;
[all …]
DparserRealSource7.types684 var importDecl = <ImportDeclaration>ast;
685 >importDecl : ImportDeclaration
689 var isExported = hasFlag(importDecl.varFlags, VarFlags.Exported);
691 >hasFlag(importDecl.varFlags, VarFlags.Exported) : any
693 >importDecl.varFlags : any
694 >importDecl : ImportDeclaration
701 …var aliasedModSymbol = findSymbolFromAlias(importDecl.alias, { topLevelScope: scopeChain, members:…
703 >findSymbolFromAlias(importDecl.alias, { topLevelScope: scopeChain, members: null, tcContext: conte…
705 >importDecl.alias : any
706 >importDecl : ImportDeclaration
[all …]
DparserRealSource7.errors.txt550 var importDecl = <ImportDeclaration>ast;
553 var isExported = hasFlag(importDecl.varFlags, VarFlags.Exported);
560 …var aliasedModSymbol = findSymbolFromAlias(importDecl.alias, { topLevelScope: scopeChain, members:…
575 typeSymbol = new TypeSymbol(importDecl.id.text, importDecl.minChar,
580 typeSymbol.aliasLink = importDecl;
585 typeSymbol.declAST = importDecl;
586 importDecl.id.sym = typeSymbol;
/third_party/typescript/src/compiler/transformers/module/
DesnextAnd2015.ts202 const importDecl = factory.createImportDeclaration( constant
214 setOriginalNode(importDecl, node.exportClause);
223 return [importDecl, exportDecl];
/third_party/typescript/tests/cases/conformance/parser/ecmascript5/
DparserRealSource7.ts154 var importDecl = <ImportDeclaration>ast;
155 var isExported = hasFlag(importDecl.varFlags, VarFlags.Exported);
158 …var aliasedModSymbol = findSymbolFromAlias(importDecl.alias, { topLevelScope: scopeChain, members:…
169 typeSymbol = new TypeSymbol(importDecl.id.text, importDecl.minChar,
172 typeSymbol.aliasLink = importDecl;
177 typeSymbol.declAST = importDecl;
178 importDecl.id.sym = typeSymbol;
/third_party/typescript/src/compiler/
Dprogram.ts2674 …const importDecl = factory.createImportDeclaration(/*modifiers*/ undefined, /*importClause*/ undef… constant
2675 addEmitFlags(importDecl, EmitFlags.NeverApplyImportHelper);
2676 setParent(externalHelpersModuleReference, importDecl);
2677 setParent(importDecl, file);
2681 (importDecl as Mutable<Node>).flags &= ~NodeFlags.Synthesized;
Dchecker.ts38676 const importDecl = importClause.parent; constant
38682 addDiagnostic(importDecl, UnusedKind.Local, unuseds.length === 1
38683 …? createDiagnosticForNode(importDecl, Diagnostics._0_is_declared_but_its_value_is_never_read, idTe…
38684 … : createDiagnosticForNode(importDecl, Diagnostics.All_imports_in_import_declaration_are_unused));
/third_party/typescript/lib/
Dtsc.js72478 var importDecl = importClause.parent;
72484 addDiagnostic(importDecl, 0, unuseds.length === 1
72485 …? ts.createDiagnosticForNode(importDecl, ts.Diagnostics._0_is_declared_but_its_value_is_never_read…
72486 …: ts.createDiagnosticForNode(importDecl, ts.Diagnostics.All_imports_in_import_declaration_are_unus…
92529 …var importDecl = factory.createImportDeclaration(undefined, factory.createImportClause(false, unde…
92530 ts.setOriginalNode(importDecl, node.exportClause);
92533 return [importDecl, exportDecl];
102203 …var importDecl = ts.factory.createImportDeclaration(undefined, undefined, externalHelpersModuleRef…
102204 ts.addEmitFlags(importDecl, 67108864);
102205 ts.setParent(externalHelpersModuleReference, importDecl);
[all …]
DtypingsInstaller.js86055 var importDecl = importClause.parent;
86061 addDiagnostic(importDecl, 0 /* UnusedKind.Local */, unuseds.length === 1
86062 …? ts.createDiagnosticForNode(importDecl, ts.Diagnostics._0_is_declared_but_its_value_is_never_read…
86063 …: ts.createDiagnosticForNode(importDecl, ts.Diagnostics.All_imports_in_import_declaration_are_unus…
112349 var importDecl = factory.createImportDeclaration(
112353 ts.setOriginalNode(importDecl, node.exportClause);
112358 return [importDecl, exportDecl];
123138 …var importDecl = ts.factory.createImportDeclaration(/*modifiers*/ undefined, /*importClause*/ unde…
123139 ts.addEmitFlags(importDecl, 67108864 /* EmitFlags.NeverApplyImportHelper */);
123140 ts.setParent(externalHelpersModuleReference, importDecl);
[all …]