mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
@@ -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";
|
||||
Reference in New Issue
Block a user