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
classMyBrand{private_a;}functiontest(strInput: string&MyBrand,numInput: number&MyBrand){switch(strInput){case"a": // error: Type '"a"' is not comparable to type 'string & MyBrand'return1;}switch(numInput){case1: // error: Type '1' is not comparable to type 'number & MyBrand'return1;}return0;}
Expected behavior:
No error reported in case statements.