mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 23:12:19 +00:00
* legalizes omitting types on function expressions within function type contexts * legalizes omitting any number of arguments
12 lines
152 B
TypeScript
12 lines
152 B
TypeScript
// array function
|
|
(x): i32 => x;
|
|
(x: i32) => x;
|
|
(x?) => x;
|
|
(x?, y?) => x;
|
|
(x?: i32) => x;
|
|
x => x;
|
|
|
|
// not an array function
|
|
(b ? x : y);
|
|
(b ? f : g)();
|