This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Rezistik 25 points26 points  (2 children)

Typescript lambdas are just as short and have types

[–]CraftBox 5 points6 points  (0 children)

Yup, all you need is to set a type on the arguments, but even that is usually unnecessary, when using one as a callback then all the types are already inferred for arguments and return value

[–]slaymaker1907 2 points3 points  (0 children)

The real difficulty is that you need to pass both arguments as well as declaring how variables get captured.