mirror of
https://github.com/swc-project/swc.git
synced 2024-12-19 19:52:21 +03:00
29 lines
344 B
TypeScript
29 lines
344 B
TypeScript
|
function foo(x) { return x; }
|
||
|
var f = function foo(x) { return x; }
|
||
|
var f2 = (x) => x;
|
||
|
var f3 = <T>(x) => x;
|
||
|
|
||
|
class C {
|
||
|
foo(x) {
|
||
|
return x;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
interface I {
|
||
|
foo(x);
|
||
|
foo2(x, y);
|
||
|
}
|
||
|
|
||
|
var a: {
|
||
|
foo(x);
|
||
|
}
|
||
|
|
||
|
var b = {
|
||
|
foo(x) {
|
||
|
return x;
|
||
|
},
|
||
|
a: function foo(x) {
|
||
|
return x;
|
||
|
},
|
||
|
b: (x) => x
|
||
|
}
|