Skip to content

Conversation

sandersn
Copy link
Member

@sandersn sandersn commented Jun 8, 2016

Fixes #9020

sandersn added 2 commits June 8, 2016 15:55
Previously, only type guards of the form `typeof x === 'string'` were
allowed. Now you can write `'string' === typeof x`.
@ahejlsberg
Copy link
Member

Shouldn't this also include checks of the form null === x?

@sandersn
Copy link
Member Author

sandersn commented Jun 9, 2016

Good idea. Done.

@mhegazy
Copy link
Contributor

mhegazy commented Jun 13, 2016

👍

@sandersn sandersn merged commit 8b09312 into master Jun 13, 2016
@sandersn sandersn deleted the primitive-type-guards-are-order-independent branch June 13, 2016 17:52
@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