Skip to content

typeof x === undefined does not raise a type error #42791

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

Closed
Jack-Works opened this issue Feb 13, 2021 · 2 comments
Closed

typeof x === undefined does not raise a type error #42791

Jack-Works opened this issue Feb 13, 2021 · 2 comments

Comments

@Jack-Works
Copy link
Contributor

Bug Report

As title describes

πŸ”Ž Search Terms

typeof undefined

πŸ•— Version & Regression Information

Happened in nightly

⏯ Playground Link

https://www.typescriptlang.org/play?ts=4.3.0-dev.20210213#code/C4TwDgpg9gZgBAIgXAvGuBXAdgEwjASywhyA

πŸ’» Code

typeof "" === undefined

πŸ™ Actual behavior

Nothing

πŸ™‚ Expected behavior

undefined is not comparable with string

@MartinJohns
Copy link
Contributor

Duplicate of #29405 / #29200. Used search terms: typeof undefined in:title

@Jack-Works
Copy link
Contributor Author

oh, I didn't search them in closed issues. let me read it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants