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
Expected behavior:
This compiles under TS 3.4.5 without any errors
Actual behavior:
In TS 3.5, this is a compile error:
Type 'string' is not assignable to type 'string & number'.
Type 'string' is not assignable to type 'number'.
This is a reasonable error IMO, the change should just be noted somewhere (an issue may already exist but I wasn't sure which keywords to search for). We saw this in the VS Code codebase
TypeScript Version: 3.4.0-dev.201xxxxx
Search Terms:
Code
Expected behavior:
This compiles under TS 3.4.5 without any errors
Actual behavior:
In TS 3.5, this is a compile error:
This is a reasonable error IMO, the change should just be noted somewhere (an issue may already exist but I wasn't sure which keywords to search for). We saw this in the VS Code codebase
Playground Link:
https://www.typescriptlang.org/play/#src=export%20interface%20I%20%7B%0D%0A%20%20%20%20x%3A%20string%3B%0D%0A%20%20%20%20y%3A%20number%3B%0D%0A%7D%0D%0A%0D%0Afunction%20copy(from%3A%20I%2C%20to%3A%20I%2C%20key%3A%20keyof%20I)%20%7B%0D%0A%20%20%20%20const%20value%20%3D%20from%5Bkey%5D%3B%0D%0A%20%20%20%20if%20(typeof%20value%20%3D%3D%3D%20'string')%20%7B%0D%0A%20%20%20%20%20%20%20%20to%5Bkey%5D%20%3D%20value%0D%0A%20%20%20%20%7D%0D%0A%7D%20
Related Issues:
The text was updated successfully, but these errors were encountered: