9 lines
228 B
TypeScript
9 lines
228 B
TypeScript
|
class C {
|
||
|
x1(a: number, callback: (x: 'hi') => number); // error
|
||
|
x1(a: number, callback: (x: any) => number) {
|
||
|
callback('hi');
|
||
|
callback('bye');
|
||
|
var hm = "hm";
|
||
|
callback(hm);
|
||
|
}
|
||
|
}
|