Home
last modified time | relevance | path

Searched refs:namedImports (Results 1 – 9 of 9) sorted by relevance

/third_party/typescript/src/services/codefixes/
DrequireInTs.ts25 … const { allowSyntheticDefaults, defaultImportName, namedImports, statement, required } = info; constant
28 …, factory.createImportClause(/*isTypeOnly*/ false, defaultImportName, namedImports), required, /*a…
34 readonly namedImports: NamedImports | undefined; property
47 …const namedImports = isObjectBindingPattern(decl.name) ? tryCreateNamedImportsFromObjectBindingPat… constant
48 if (defaultImportName || namedImports) {
52 namedImports,
DimportFixes.ts59 readonly namedImports: ESMap<string, AddAsTypeOnly>; property
108 …(key, entry = { importClauseOrBindingPattern, defaultImport: undefined, namedImports: new Map() });
111 const prevValue = entry?.namedImports.get(symbolName);
112 … entry.namedImports.set(symbolName, reduceAddAsTypeOnlyValues(prevValue, addAsTypeOnly));
134 const prevValue = (entry.namedImports ||= new Map()).get(symbolName);
135 … entry.namedImports.set(symbolName, reduceAddAsTypeOnlyValues(prevValue, addAsTypeOnly));
175 namedImports: undefined, constant
207 … addToExisting.forEach(({ importClauseOrBindingPattern, defaultImport, namedImports }) => {
213 … arrayFrom(namedImports.entries(), ([name, addAsTypeOnly]) => ({ addAsTypeOnly, name })),
218 … newImports.forEach(({ useRequire, defaultImport, namedImports, namespaceLikeImport }, key) => {
[all …]
/third_party/typescript/src/services/
DorganizeImports.ts255 const { defaultImports, namespaceImports, namedImports } = group; constant
258 …nly && defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) {
276 if (defaultImports.length === 0 && namedImports.length === 0) {
292 newImportSpecifiers.push(...getNewImportSpecifiers(namedImports));
297 : namedImports[0];
303 : namedImports.length === 0
305 …: factory.updateNamedImports(namedImports[0].importClause!.namedBindings as NamedImports, sortedIm…
314 …updateImportDeclarationAndClause(namedImports[0] ?? importDecl, /*name*/ undefined, newNamedImport…
329 namedImports: ImportDeclaration[]; property
341 …onst typeOnlyImports: ImportGroup = { defaultImports: [], namespaceImports: [], namedImports: [] };
[all …]
DtextChanges.ts788 …fierAtIndex(sourceFile: SourceFile, importSpecifier: ImportSpecifier, namedImports: NamedImports, …
789 const prevSpecifier = namedImports.elements[index - 1];
796 namedImports.elements[0],
798 …!positionsAreOnSameLine(namedImports.elements[0].getStart(), namedImports.parent.parent.getStart()…
1478 const namedImports = (node as ImportSpecifier).parent; constant
1479 if (namedImports.elements.length === 1) {
1480 deleteImportBinding(changes, sourceFile, namedImports);
Dutilities.ts1959 …export function makeImportIfNecessary(defaultImport: Identifier | undefined, namedImports: readonl…
1960 …return defaultImport || namedImports && namedImports.length ? makeImport(defaultImport, namedImpor…
1963 …export function makeImport(defaultImport: Identifier | undefined, namedImports: readonly ImportSpe…
1966 defaultImport || namedImports
1967 …rtClause(!!isTypeOnly, defaultImport, namedImports && namedImports.length ? factory.createNamedImp…
/third_party/node/test/es-module/
Dtest-esm-cjs-named-error.mjs6 const errTemplate = (specifier, name, namedImports) => argument
11 `\n\nimport pkg from '${specifier}';\n` + (namedImports ?
12 `const ${namedImports} = pkg;\n` : '');
/third_party/typescript/src/compiler/
DohApi.ts397 namedImports: ImportSpecifier[]
527 currentTypeImportInfo.namedImports.push(node);
540 else if (currentTypeImportInfo.namedImports.length > 0) {
541 namedBindings = factory.createNamedImports(currentTypeImportInfo.namedImports);
682 … currentTypeImportInfo = { name: undefined, namespaceImport: undefined, namedImports:[] };
/third_party/typescript/lib/
Dtsc.js38586 currentTypeImportInfo.namedImports.push(node);
38594 else if (currentTypeImportInfo.namedImports.length > 0) {
38595 namedBindings = ts.factory.createNamedImports(currentTypeImportInfo.namedImports);
38685 … currentTypeImportInfo = { name: undefined, namespaceImport: undefined, namedImports: [] }; property
DtypingsInstaller.js46856 currentTypeImportInfo.namedImports.push(node);
46868 else if (currentTypeImportInfo.namedImports.length > 0) {
46869 namedBindings = ts.factory.createNamedImports(currentTypeImportInfo.namedImports);
46993 … currentTypeImportInfo = { name: undefined, namespaceImport: undefined, namedImports: [] }; property