Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boolean CLI options in standard "--someFlag=someValue" form fail with "error TS5023: Unknown compiler option..." #52655

Open
1 of 4 tasks
broofa opened this issue Feb 7, 2023 · 0 comments
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript

Comments

@broofa
Copy link

broofa commented Feb 7, 2023

Bug Report

tl;dr: User's expect to assign CLI flag options with an equal sign. E.g.--flag=value. That this fails in tsc with an unobvious error is confusing. It misleads users into thinking there isn't a way of disabling options from the command line. For example:

Even if you wanted to forgo the speed benefits of "incremental"... you can't turn it off temporarily because there is no --noIncremental (or analogous) flag.

The form above is wide-spread, especially within the JS community ...

🔎 Search Terms

error TS5023: Unknown compiler option

🕗 Version & Regression Information

Boolean CLI options were first introduced in #11798 , but have never supported the standard --flag=value format

  • This is a crash
  • This changed between versions ______ and _______
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
  • I was unable to test this on prior versions because _______

🙁 Actual behavior

Providing boolean CLI options like --incremental=false, --noEmit=false, and so on all result in a TS5023: Unknown compiler option error.

🙂 Expected behavior

Using the standard double-dash notation of "--flagName=flagValue" (.e.g --incremental=false) should work as expected.

@DanielRosenwasser DanielRosenwasser added Suggestion An idea for TypeScript Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature labels Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants