Skip to content

Feature request: Allow to combine default type import with named importsΒ #61972

Open
@danielrentz

Description

@danielrentz

πŸ” Search Terms

default named type import

βœ… Viability Checklist

⭐ Suggestion

Allow to combine default type import with named imports in a single statement.

πŸ“ƒ Motivating Example

All these lines are valid syntax:

import def from "m";
import def, { name } from "m";
import def, type { T } from "m";
import def, { type T } from "m";
import type D from "m";

These lines should be valid syntax as well:

import type D, { name } from "m";
import type D, type { T } from "m";
import type D, { type T } from "m";

πŸ’» Use Cases

  1. What do you want to use this for? Shorter code, consistency.
  2. What shortcomings exist with current approaches?
  3. What workarounds are you using in the meantime? Separate imports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions