Skip to content

Fix typechecking related lints that changed post 4.8, update LKG to 4.8.2 - #50472

Merged
Jake Bailey (jakebailey) merged 3 commits into
microsoft:mainfrom
jakebailey:fix-48-lints
Aug 26, 2022
Merged

Fix typechecking related lints that changed post 4.8, update LKG to 4.8.2#50472
Jake Bailey (jakebailey) merged 3 commits into
microsoft:mainfrom
jakebailey:fix-48-lints

Conversation

@jakebailey

@jakebailey Jake Bailey (jakebailey) commented Aug 26, 2022

Copy link
Copy Markdown
Member

0715791 updated our workspace TS to 4.8, which changed which TS that ESLint used. These two cases are type assertions that aren't needed anymore in 4.8 with the new narrowing tweaks.

This PR will fail to build because our LKG is too old; I will update the PR with that shortly (I just wanted to see the CI fail). EDIT: Updated.

@jakebailey Jake Bailey (jakebailey) changed the title Fix typechecking related lints that changed post 4.8 Fix typechecking related lints that changed post 4.8, update LKG to 4.8.2 Aug 26, 2022
@jakebailey
Jake Bailey (jakebailey) marked this pull request as ready for review August 26, 2022 17:22
@jakebailey

Jake Bailey (jakebailey) commented Aug 26, 2022

Copy link
Copy Markdown
Member Author

I've done something slightly different than normal; I ran:

$ git checkout upstream/release-4.8 -- lib

This pulls in the current stable release as our LKG, rather than pulling in what's in main. I feel like this is a safer increment, but, I'm happy to do the more traditional option instead, which might be better in terms of matching VS Code TS nightly (but, as always, might confuse tooling like eslint).

@jakebailey

Copy link
Copy Markdown
Member Author

This does beg the question, though; should our own workspace version of TS be pinned to a specific version? That way, we can make changes in step with npm and LKG?

Comment thread src/compiler/parser.ts
@@ -2973,7 +2973,7 @@ namespace ts {
function parseDelimitedList<T extends Node | undefined>(kind: ParsingContext, parseElement: () => T, considerSemicolonAsDelimiter?: boolean): NodeArray<NonNullable<T>> | undefined {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

IMO these two fixes should really have T extends Node, then refer to T | undefined, but, this is the more minimal fix.

@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants