Skip to content

Port TS#62611: add allowJs default value description#2727

Merged
jakebailey merged 3 commits intomainfrom
copilot/add-default-value-description
Feb 10, 2026
Merged

Port TS#62611: add allowJs default value description#2727
jakebailey merged 3 commits intomainfrom
copilot/add-default-value-description

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 10, 2026

  • Investigate TypeScript PR #62611 - changes allowJs defaultValueDescription from false to `false`, unless `checkJs` is set
  • Verify diagnostic message X_false_unless_checkJs_is_set already exists in Go codebase (code 6932)
  • Update allowJs option in declscompiler.go to use the diagnostic message
  • Build and verify
  • Run tests and accept all baselines (10 files total)
  • Code review and security scan

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Change the allowJs compiler option's defaultValueDescription from false
to the diagnostic message 'false, unless checkJs is set' to document
the conditional default where checkJs implies allowJs.

Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
Copilot AI changed the title [WIP] Add allowJs default value description Port TS#62611: add allowJs default value description Feb 10, 2026
Copilot AI requested a review from jakebailey February 10, 2026 21:53
@jakebailey jakebailey marked this pull request as ready for review February 10, 2026 21:54
Copilot AI review requested due to automatic review settings February 10, 2026 21:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR ports TypeScript#62611 to update the help text for the allowJs compiler option to accurately reflect its conditional default behavior. The allowJs option has defaulted to true when checkJs is set since TypeScript 4.1, but the help output incorrectly showed it as simply defaulting to false.

Changes:

  • Updated DefaultValueDescription for allowJs option to use the diagnostic message X_false_unless_checkJs_is_set
  • Accepted baseline updates for 8 help output test files to reflect the corrected default description

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/tsoptions/declscompiler.go Changed allowJs DefaultValueDescription from false to diagnostics.X_false_unless_checkJs_is_set
testdata/baselines/reference/tscWatch/commandLine/Parse-watch-interval-option-without-tsconfig.json.js Updated baseline for help output showing new allowJs default description
testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js Updated baseline for help output showing new allowJs default description
testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-cannot-provide-terminal-width.js Updated baseline for help output showing new allowJs default description
testdata/baselines/reference/tsc/commandLine/help.js Updated baseline for help output showing new allowJs default description
testdata/baselines/reference/tsc/commandLine/help-all.js Updated baseline for help output showing new allowJs default description
testdata/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js Updated baseline for help output showing new allowJs default description
testdata/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set-even-if-FORCE_COLOR-is-set.js Updated baseline for help output showing new allowJs default description
testdata/baselines/reference/tsc/commandLine/adds-color-when-FORCE_COLOR-is-set.js Updated baseline for help output showing new allowJs default description

@jakebailey
Copy link
Copy Markdown
Member

@copilot you still have baselines out of date; rerun tests and accept

Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 10, 2026

@copilot you still have baselines out of date; rerun tests and accept

Accepted the 2 remaining baselines (ignoreConfig/without-any-options-when-config-file-absent-with---ignoreConfig.js and ignoreConfig/without-any-options-when-config-file-absent.js) in bf59f3c.

@jakebailey jakebailey added this pull request to the merge queue Feb 10, 2026
Merged via the queue into main with commit 27522c5 Feb 10, 2026
20 checks passed
@jakebailey jakebailey deleted the copilot/add-default-value-description branch February 10, 2026 22:51
Copilot AI added a commit that referenced this pull request Feb 25, 2026
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
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.

4 participants