Skip to content

add verbatimModuleSyntax to strictest#322

Open
dynst wants to merge 1 commit intotsconfig:mainfrom
dynst:verbatim
Open

add verbatimModuleSyntax to strictest#322
dynst wants to merge 1 commit intotsconfig:mainfrom
dynst:verbatim

Conversation

@dynst
Copy link

@dynst dynst commented Sep 8, 2025

verbatimModuleSyntax was implemented in TS 5.0 but was never added to this base config.

But it changes the output of transpiling, instead of just adding a new error case, so use its predecessor, importsNotUsedAsValues: "error", from TS 3.8.

The new erasableSyntaxOnly would be too code-breaking to add even to strictest, though.

Related to: #212

verbatimModuleSyntax was implemented in TS 5.0 but was never added
to this base config.

(Its predecessor, importsNotUsedAsValues: "error", was added in TS 3.8,
and was also never added here.)
@jakebailey
Copy link
Collaborator

This may be a challenge, because it basically prevents anyone from using ESM syntax in files that emit as CJS, or break CJS cases that would probably work fine in bundler resolution.

@dynst
Copy link
Author

dynst commented Sep 8, 2025

Good point. If we just want to strictly error when a value import is only used as a type, then the deprecated option is actually better.

@jakebailey
Copy link
Collaborator

No, definitely not, that option is deprecated and will error in 5.5+, and has been entirely removed in 7.0 and probably 6.0 soon.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants