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
interfaceTest1{type: 'test1'label: 'string'}interfaceTest2{type: 'test2'}leta: Test1|Test2if(a.type=='test1'){console.log(a.label)// works oksetTimeout(()=>{console.log(a.label)// Error: Property 'label' does not exist on type 'Test1 | Test2'})}
Expected behavior:
setTimeout case should work ?
Actual behavior: Error: Property 'label' does not exist on type 'Test1 | Test2' in setTimeout
The text was updated successfully, but these errors were encountered:
TypeScript Version: (2.0.0-beta)
Code
Expected behavior:
setTimeout case should work ?
Actual behavior:
Error: Property 'label' does not exist on type 'Test1 | Test2'
insetTimeout
The text was updated successfully, but these errors were encountered: