Files

7 lines
310 B
Plaintext

contextualTyping30.ts(1,41): error TS2322: Type 'string' is not assignable to type 'number'.
==== contextualTyping30.ts (1 errors) ====
function foo(param:number[]){}; foo([1, "a"]);
~~~
!!! error TS2322: Type 'string' is not assignable to type 'number'.