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
typeOption='a'|{result: number}typeValue={option: Option}functiondo1(value: Value){if(value.option!='a'){const{ result }=value.option}}functiondo2(value: Value){if(value.option!='a'){const{option: { result }}=value// [ts] Type 'Option' has no property 'result' and no string index signature.}}
Expected behavior: do2 works as do1, type of value.option is determined Actual behavior: do2 works differently from do1, type of value.option is not determined
The text was updated successfully, but these errors were encountered:
TypeScript Version: 2.1.1 / nightly (2.2.0-dev.201xxxxx)
2.1.1
Code
Expected behavior:
do2
works asdo1
, type ofvalue.option
is determinedActual behavior:
do2
works differently fromdo1
, type ofvalue.option
is not determinedThe text was updated successfully, but these errors were encountered: