π Search Terms
allowJs, checkJs, default value, help
π Version & Regression Information
- The default value changed in this PR, without corresponding documentation changes.
β― Playground Link
No response
π» Code
No response
π Actual behavior
tsc just states that the default is false
$ tsc --help --all | grep -A3 "allowJs"
--allowJs
Allow JavaScript files to be a part of your program. Use the 'checkJs' option to get errors from these files.
type: boolean
default: false
π Expected behavior
tsc correctly states that is is conditional
$ tsc --help --all | grep -A3 "allowJs"
--allowJs
Allow JavaScript files to be a part of your program. Use the 'checkJs' option to get errors from these files.
type: boolean
default: `false`, unless `checkJs` is set
Additional information about the issue
Similar conditional defaults are already documented for other options:
% tsc --help --all | grep -A3 "noImplicitAny"
--noImplicitAny
Enable error reporting for expressions and declarations with an implied 'any' type.
type: boolean
default: `false`, unless `strict` is set
% tsc --help --all | grep -A3 "\-\-declaration"
--declaration, -d
Generate .d.ts files from TypeScript and JavaScript files in your project.
type: boolean
default: `false`, unless `composite` is set
I've seen some confusion around this, most recently in @tsconfig/strictest, where they set checkJs: true and allowJs: undefined with the intention of not allowing js unless explicitly set by extending configs (tsconfig/bases#88).
I opened #62611 to update the default value description to fix this
π Search Terms
allowJs, checkJs, default value, help
π Version & Regression Information
β― Playground Link
No response
π» Code
No response
π Actual behavior
tsc just states that the default is
falseπ Expected behavior
tsc correctly states that is is conditional
Additional information about the issue
Similar conditional defaults are already documented for other options:
I've seen some confusion around this, most recently in
@tsconfig/strictest, where they setcheckJs: trueandallowJs: undefinedwith the intention of not allowing js unless explicitly set by extending configs (tsconfig/bases#88).I opened #62611 to update the default value description to fix this