TypeScript Version: 1.8.4
Code
typestringType1="foo"|"bar";typestringType2="baz"|"bar";interfaceTemp1{getValue(name: stringType1);}interfaceTemp2{getValue(name: stringType2);}functiontest(t: Temp1|Temp2){varz=t.getValue("bar");// Error here}Expected behavior:
I was hoping everything would go fine (which is the case when I only use one interface in the function test
Actual behavior:
I get an error: "Cannot invoke an expression whose type lacks a call signature". Is this by design?
TypeScript Version: 1.8.4
Code
Expected behavior:
I was hoping everything would go fine (which is the case when I only use one interface in the function
testActual behavior:
I get an error: "Cannot invoke an expression whose type lacks a call signature". Is this by design?