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

TS looses previously determined type #48901

Closed
bpasero opened this issue Apr 21, 2022 · 4 comments
Closed

TS looses previously determined type #48901

bpasero opened this issue Apr 21, 2022 · 4 comments
Labels
Duplicate An existing issue was already created

Comments

@bpasero
Copy link
Member

bpasero commented Apr 21, 2022

@bpasero bpasero added Bug A bug in TypeScript typescript labels Apr 21, 2022
@IllusionMH
Copy link
Contributor

Looks like not the first case for Array.isArray and IAction combo
#41889
#39258

@mjbvz mjbvz transferred this issue from microsoft/vscode Apr 30, 2022
@mjbvz
Copy link
Contributor

mjbvz commented Apr 30, 2022

Self contained example:

let errorActions: readonly string[] | undefined = undefined;
if (Array.isArray(errorActions)) {
    // check errorActions here
    console.log(errorActions)
}

@mjbvz mjbvz removed their assignment Apr 30, 2022
@mjbvz mjbvz removed Bug A bug in TypeScript typescript labels Apr 30, 2022
@andrewbranch
Copy link
Member

Duplicate of #17002

@andrewbranch andrewbranch marked this as a duplicate of #17002 May 2, 2022
@andrewbranch andrewbranch added the Duplicate An existing issue was already created label May 2, 2022
@typescript-bot
Copy link
Collaborator

This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

5 participants