Suggestion
Add support in the TS server to include import type and inline type imports when auto-importing.
// TS server auto-imports like so:
import { Foo } from './foo';
// But I want to be able to specify that it should treat types like so:
import type { Foo } from './foo';
// or
import { type Foo } from './foo';
🔍 Search Terms
- inline type import
- import type isolatedmodules
✅ Viability Checklist
My suggestion meets these guidelines:
⭐ Suggestion
See above
📃 Motivating Example
Many build systems require isolated modules (e.g., esbuild), and often require that types be thusly marked when imported. According to my understanding, that is only done manually, as enabling isolatedModules doesn't seem to affect things.
💻 Use Cases
Work better with isolated module build system requirements. One could also argue that legibility is improved with type imports.
Suggestion
Add support in the TS server to include
import typeand inlinetypeimports when auto-importing.🔍 Search Terms
✅ Viability Checklist
My suggestion meets these guidelines:
⭐ Suggestion
See above
📃 Motivating Example
Many build systems require isolated modules (e.g., esbuild), and often require that types be thusly marked when imported. According to my understanding, that is only done manually, as enabling
isolatedModulesdoesn't seem to affect things.💻 Use Cases
Work better with isolated module build system requirements. One could also argue that legibility is improved with
typeimports.