Home
last modified time | relevance | path

Searched refs:namedBindings (Results 1 – 25 of 42) sorted by relevance

12

/third_party/typescript/src/services/
DorganizeImports.ts103 let { name, namedBindings } = importClause;
110 if (namedBindings) {
111 if (isNamespaceImport(namedBindings)) {
113 if (!isDeclarationUsed(namedBindings.name)) {
114 namedBindings = undefined;
119 … const newElements = namedBindings.elements.filter(e => isDeclarationUsed(e.name));
120 if (newElements.length < namedBindings.elements.length) {
121 namedBindings = newElements.length
122 ? factory.updateNamedImports(namedBindings, newElements)
128 if (name || namedBindings) {
[all …]
DimportTracker.ts264 …const { name, namedBindings } = decl.importClause || { name: undefined, namedBindings: undefined }; constant
266 if (namedBindings) {
267 switch (namedBindings.kind) {
269 handleNamespaceImportLike(namedBindings.name);
274 searchForNamedImport(namedBindings);
278 Debug.assertNever(namedBindings);
303 function searchForNamedImport(namedBindings: NamedImportsOrExports | undefined): void {
304 if (!namedBindings) {
308 for (const element of namedBindings.elements) {
DsuggestionDiagnostics.ts94 …urn importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings
95 ? importClause.namedBindings.name
DnavigationBar.ts250 const { namedBindings } = importClause; constant
251 if (namedBindings) {
252 if (namedBindings.kind === SyntaxKind.NamespaceImport) {
253 addLeafNode(namedBindings);
256 for (const element of namedBindings.elements) {
Dutilities.ts822 if (node.importClause.name && node.importClause.namedBindings) {
839 if (node.importClause.namedBindings) {
840 if (isNamedImports(node.importClause.namedBindings)) {
842 const onlyBinding = singleOrUndefined(node.importClause.namedBindings.elements);
848 else if (isNamespaceImport(node.importClause.namedBindings)) {
849 return node.importClause.namedBindings.name;
Dservices.ts833 if (importClause.namedBindings) {
834 … if (importClause.namedBindings.kind === SyntaxKind.NamespaceImport) {
835 addDeclaration(importClause.namedBindings);
838 forEach(importClause.namedBindings.elements, visit);
/third_party/typescript/src/services/refactors/
DmoveToNewFile.ts212 …return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kin…
213 node.importClause.namedBindings.name : undefined;
372 const { name, namedBindings } = importDecl.importClause; constant
374 const namedBindingsUnused = !namedBindings ||
375 …(namedBindings.kind === SyntaxKind.NamespaceImport ? isUnused(namedBindings.name) : namedBindings.…
383 if (namedBindings) {
391 else if (namedBindings.kind === SyntaxKind.NamedImports) {
392 for (const element of namedBindings.elements) {
589 … const namedBindings = clause.namedBindings && filterNamedBindings(clause.namedBindings, keep); constant
590 return defaultImport || namedBindings
[all …]
DconvertExport.ts174 const { namedBindings } = clause; constant
175 if (!namedBindings) {
179 else if (namedBindings.kind === SyntaxKind.NamespaceImport) {
181 …e(importingSourceFile, { pos: ref.getStart(importingSourceFile), end: namedBindings.getStart(impor…
189 … changes.insertNodeAtEndOfList(importingSourceFile, namedBindings.elements, spec);
DconvertImport.ts65 if (!importClause.namedBindings) {
69 return importClause.namedBindings;
/third_party/typescript/src/services/codefixes/
DconvertToTypeOnlyImport.ts39 if (importClause.name && importClause.namedBindings) {
40 …eExcludingEnd(context.sourceFile, importClause.name, importDeclaration.importClause.namedBindings);
DimportFixes.ts338 … const namespaceImport = tryCast(declaration.importClause?.namedBindings, isNamespaceImport);
352 … return tryCast(declaration.importClause?.namedBindings, isNamespaceImport)?.name.text;
368 const { name, namedBindings } = importClause; constant
369 …ind.Default && !name || importKind === ImportKind.Named && (!namedBindings || namedBindings.kind =…
738 …const existingSpecifiers = clause.namedBindings && cast(clause.namedBindings, isNamedImports).elem…
746 … const prevSpecifier = (clause.namedBindings as NamedImports).elements[insertionIndex - 1];
767 if (clause.namedBindings) {
768 changes.replaceNode(sourceFile, clause.namedBindings, namedImports);
DsplitTypeOnlyImport.ts40 …mportClause(importClause, importClause.isTypeOnly, /*name*/ undefined, importClause.namedBindings),
DconvertToEs6Module.ts472 …const namedBindings = namedBindingsNames.size === 0 ? undefined : arrayFrom(mapIterator(namedBindi… constant
474 if (!namedBindings) {
479 …Import(needDefaultImport ? getSynthesizedDeepClone(name) : undefined, namedBindings, moduleSpecifi…
/third_party/typescript/src/compiler/transformers/
Dutilities.ts48 const bindings = node.importClause && node.importClause.namedBindings;
65 …se && isNamedImports(node.importClause.namedBindings!) && containsDefaultReference(node.importClau…
Ddeclarations.ts725 if (!decl.importClause.namedBindings) {
734 if (decl.importClause.namedBindings.kind === SyntaxKind.NamespaceImport) {
736 …const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.import… constant
737 …return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl, /*decorators…
741 namedBindings,
745 …const bindingList = mapDefined(decl.importClause.namedBindings.elements, b => resolver.isDeclarati…
755 … && bindingList.length ? factory.updateNamedImports(decl.importClause.namedBindings, bindingList) …
Dts.ts2845 …const namedBindings = visitNode(node.namedBindings, visitNamedImportBindings, isNamedImportBinding… constant
2846 …return (name || namedBindings) ? factory.updateImportClause(node, /*isTypeOnly*/ false, name, name…
/third_party/typescript/src/compiler/factory/
Dutilities.ts406 let namedBindings: NamedImportBindings | undefined;
425 namedBindings = nodeFactory.createNamedImports(
441 namedBindings = nodeFactory.createNamespaceImport(externalHelpersModuleName);
444 if (namedBindings) {
448 … nodeFactory.createImportClause(/*isTypeOnly*/ false, /*name*/ undefined, namedBindings),
DnodeFactory.ts3968 …createImportClause(isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBi…
3972 node.namedBindings = namedBindings;
3975 propagateChildFlags(node.namedBindings);
3984 …ode: ImportClause, isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBi…
3987 || node.namedBindings !== namedBindings
3988 ? update(createImportClause(isTypeOnly, name, namedBindings), node)
/third_party/typescript/src/compiler/transformers/module/
Dsystem.ts952 const namedBindings = importClause.namedBindings; constant
953 if (namedBindings) {
954 switch (namedBindings.kind) {
956 statements = appendExportsOfDeclaration(statements, namedBindings);
960 for (const importBinding of namedBindings.elements) {
Dmodule.ts1403 const namedBindings = importClause.namedBindings; constant
1404 if (namedBindings) {
1405 switch (namedBindings.kind) {
1407 statements = appendExportsOfDeclaration(statements, namedBindings);
1411 for (const importBinding of namedBindings.elements) {
/third_party/typescript/src/testRunner/unittests/services/
DorganizeImports.ts992 assertEqual(clause1.namedBindings, clause2.namedBindings);
/third_party/typescript/src/deprecatedCompat/
Ddeprecations.ts1205 …g.deprecate(function createImportClause(name: Identifier | undefined, namedBindings: NamedImportBi…
1206 return factory.createImportClause(isTypeOnly, name, namedBindings);
1210 … updateImportClause(node: ImportClause, name: Identifier | undefined, namedBindings: NamedImportBi…
1211 return factory.updateImportClause(node, isTypeOnly, name, namedBindings);
/third_party/typescript/src/services/formatting/
DsmartIndenter.ts637 …(!!(<ImportClause>child).namedBindings && (<ImportClause>child).namedBindings!.kind !== SyntaxKind…
/third_party/typescript_eslint/packages/typescript-estree/src/
Dconvert.ts1607 if (node.importClause.namedBindings) {
1608 switch (node.importClause.namedBindings.kind) {
1611 this.convertChild(node.importClause.namedBindings),
1616 node.importClause.namedBindings.elements.map(el =>
/third_party/typescript/lib/
Dtsserverlibrary.js15908 … return node.importClause && ts.tryCast(node.importClause.namedBindings, ts.isNamespaceImport);
15928 if (node.namedBindings) {
15929 var result = ts.isNamespaceImport(node.namedBindings)
15930 ? action(node.namedBindings)
15931 : ts.forEach(node.namedBindings.elements, action);
23787 function createImportClause(isTypeOnly, name, namedBindings) { argument
23791 node.namedBindings = namedBindings;
23794 propagateChildFlags(node.namedBindings);
23802 function updateImportClause(node, isTypeOnly, name, namedBindings) { argument
23805 || node.namedBindings !== namedBindings
[all …]

12