Skip to content

Should add type to type-only export by default #838

Description

@2wheeh

related to #678

type-only export also needs type keyword. Current output from telescope mixes normal import/export and type-only import/export.

This is not compatible with verbatimModuleSyntax, which helps bundlers to drop type-only import/export while transpiling.

tsc (or tsc-based tools ex. tshy, zshy) would not have any problem with mixing import/export since tsc has type info while walking AST but the modern bundlers (esbuild, Oxc, ...) don't. They run tsc only as a type checker, then strip type for transpiling, leaving type-only import/export on run-time js source.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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