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
typeAB='A'|'B';typeABMAP={[PinAB]: string}constabMap: ABMAP={'A': 'a','B': 'b'}functionlog(p: AB){//}for(constpinabMap){log(p);// <<-- Argument of type 'string' is not assignable to parameter of type 'AB'.}
Expected behavior: p is of type AB.
Actual behavior: p is of type string
The text was updated successfully, but these errors were encountered:
TypeScript Version: 2.2.1
Code
Expected behavior:
p
is of typeAB
.Actual behavior:
p
is of typestring
The text was updated successfully, but these errors were encountered: