mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 15:25:54 -06:00
parent
2be6aaf813
commit
7281bb7510
@ -243,6 +243,15 @@ D();
|
||||
import { F1, F2 } from "lib";
|
||||
import * as NS from "lib";
|
||||
import D from "lib";
|
||||
`,
|
||||
},
|
||||
libFile);
|
||||
|
||||
testOrganizeImports("Unused_Empty",
|
||||
{
|
||||
path: "/test.ts",
|
||||
content: `
|
||||
import { } from "lib";
|
||||
`,
|
||||
},
|
||||
libFile);
|
||||
|
||||
@ -198,7 +198,9 @@ namespace ts.OrganizeImports {
|
||||
: namedImports[0];
|
||||
|
||||
const newNamedImports = sortedImportSpecifiers.length === 0
|
||||
? undefined
|
||||
? newDefaultImport
|
||||
? undefined
|
||||
: createNamedImports(emptyArray)
|
||||
: namedImports.length === 0
|
||||
? createNamedImports(sortedImportSpecifiers)
|
||||
: updateNamedImports(namedImports[0].importClause.namedBindings as NamedImports, sortedImportSpecifiers);
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
// ==ORIGINAL==
|
||||
|
||||
import { } from "lib";
|
||||
|
||||
// ==ORGANIZED==
|
||||
|
||||
import { } from "lib";
|
||||
Loading…
x
Reference in New Issue
Block a user