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
Actual behavior:
Typescript does not detect any relation between x and y variables in function b, so it does not figure out that x === true => y is number[].
TypeScript Version: 3.8.0-dev.20191022
Search Terms: destructuring
Code
Expected behavior:
Function
b
should compile.Actual behavior:
Typescript does not detect any relation between
x
andy
variables in functionb
, so it does not figure out thatx === true => y is number[]
.Playground Link: http://www.typescriptlang.org/play/?ts=3.8.0-dev.20191022&ssl=1&ssc=1&pln=17&pc=1#code/C4TwDgpgBAGlC8UDeAPAXFYAnArhANFCBgHY4C2ARhFgNoC6AvgNwBQokUAmgsulADMAhgBsAzgSIYcJACYQBASxIRZLduGgAtXnAA+3NqwEyAxsEUB7ElCEAKfloCUyVlCiKBUBwDoULpDd3KBQfEB8BSywAUSFTAAs7U2sxSxEIHxFLAHMnNndGVkLjMwtrKEo7VEIQRgxnV3dPb39G4PDImLjE5JJU9MycvLcAehGoAD0oAHlKACsIcw8xKDBLMTFFShEQKAByGXklFVk9oMLCoA
Related Issues: None
The text was updated successfully, but these errors were encountered: