TypeScript/tests/baselines/reference/overloadOnConstInCallback1.errors.txt

12 lines
478 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/overloadOnConstInCallback1.ts (1 errors) ====
class C {
x1(a: number, callback: (x: 'hi') => number); // error
~~~~~~~~~~~~~~~~~~~
!!! Specialized overload signature is not assignable to any non-specialized signature.
x1(a: number, callback: (x: any) => number) {
callback('hi');
callback('bye');
var hm = "hm";
callback(hm);
}
}