You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given typescript is a superset of JS it must compile
it does. the compiler will generate JavaScript fro your input that is identical. Compiler errors do not stop the generation of output. the compiler will however warn you about possible issues. that applies to almost all errors in TS.
TypeScript Version: 3.0.0-dev.201xxxxx
Search Terms:
Code
Expected behavior:
Given typescript is a superset of JS it must compile
Actual behavior:
It fails with the
operator === cannot be applied to types false and true
Playground Link:
https://www.typescriptlang.org/play/#src=var%20a%20%3D%20false%3B%0D%0A%0D%0Aif%20(a%20%3D%3D%3D%20true)%20%7B%0D%0A%20%20%20%20console.log('foo')%0D%0A%7D
Related Issues:
It was at least reported at #11178 but for some reason the original poster has closed it
The text was updated successfully, but these errors were encountered: