Skip to content

Make type guards continue to narrow within classes/nested function declarations #5626

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

Merged
merged 4 commits into from
Nov 19, 2015

Conversation

weswigham
Copy link
Member

Fixes #5619.

else {
let m = class {
constructor() {
x; // Should be "number"
Copy link
Member

Choose a reason for hiding this comment

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

Can you move this assertion from a comment to

let str: string
:
:
str = x;

@mhegazy
Copy link
Contributor

mhegazy commented Nov 19, 2015

👍

@sandersn
Copy link
Member

Sorry, I thought I signed off earlier. :1+:

weswigham added a commit that referenced this pull request Nov 19, 2015
Make type guards continue to narrow within classes/nested function declarations
@weswigham weswigham merged commit b1c8245 into microsoft:master Nov 19, 2015
@weswigham weswigham deleted the type-guard-narrowing branch August 17, 2017 23:04
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
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.

4 participants