Skip to content

Fix unneeded cast lints#29383

Merged
weswigham merged 1 commit intomicrosoft:masterfrom
weswigham:fix-cast-lints
Jan 11, 2019
Merged

Fix unneeded cast lints#29383
weswigham merged 1 commit intomicrosoft:masterfrom
weswigham:fix-cast-lints

Conversation

@weswigham
Copy link
Copy Markdown
Member

@weswigham weswigham commented Jan 11, 2019

We pulled a change into our nightly that allowed references in control flow to contain ! and still match, which makes some casts in our codebase unneeded. Our LKG is older than the nightly, so we technically still need the casts to bootstrap right now, even though the linter knows we won't. As a compromise, I just refactored the offending locations to a form that didn't use so many !. IMO, it's nicer this way.

@weswigham weswigham merged commit fadd95f into microsoft:master Jan 11, 2019
@weswigham weswigham deleted the fix-cast-lints branch January 11, 2019 22:24
Comment thread src/compiler/builder.ts
@@ -78,7 +78,8 @@ namespace ts {
if (useOldState) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

/src/compiler/builder.ts

Comment thread src/compiler/builder.ts
@@ -78,7 +78,8 @@ namespace ts {
if (useOldState) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

/src/compiler/builder.ts

errendir added a commit to errendir/TypeScript that referenced this pull request Jan 14, 2019
* origin/master: (1082 commits)
  Fix unneeded cast lints (microsoft#29383)
  Extracted compilerOptions setting to helper function
  Added codefix to enable experimentalDecorators in the user's config file
  Add tests for noLib with <reference lib> and bundling.
  Add tests for noLib with <reference lib>.
  Do not process library reference directives with noLib set.
  emit jsx type arguments
  Allow circular umd-merged-with-augmentation refs to resolve to the module as intended (microsoft#29335)
  Allow nonnull assertions in references (microsoft#29351)
  Accept new baselines
  Add regression tests
  Improve logic that determines when to resolve conditional types
  Update user baselines (microsoft#29336)
  Fix crash (microsoft#29333)
  Exclude JSDoc @extends from 'super()' checks (microsoft#29308)
  Fix existing test
  Verify that completion with new identifier location returns isNewIdentifierLocation: true Fixes microsoft#24009
  Fix the failing test case
  There is no need to check for file presence when trying to rename imports based on file rename Fixes microsoft#29031
  Fix gulp baseline-accept (microsoft#29301)
  ...
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants