parameter type inference for anonymous functions in assignments
See original GitHub issueHere is one possible use case
shared Object bar(Request req, Response res) => "Hello";
shared Object baz(Request req, Response res) => "World ";
// ...
//vs
shared alias Route => Object(Request, Response);
shared Route bar = (req, res) => "Hello";
shared Route baz = (req, res) => "World";
// ...
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Proposal for Parameter Type Inference for immediately invoked ...
I have to target ES3/ES5 and I quite often find myself writing something like this: for (let roleType of this.RoleTypes) { ((roleType) =>...
Read more >Anonymous Functions - HHVM and Hack Documentation
Type Inference. Unlike named functions, type annotations are optional on anonymous functions. You can still add explicit types if you wish.
Read more >Lambda expressions and anonymous functions | Microsoft Learn
You use a lambda expression to create an anonymous function. Use the lambda declaration operator => to separate the lambda's parameter list ...
Read more >Type inference - Kotlin language specification
Kotlin has a concept of type inference for compile-time type information, meaning some type information in the code may be omitted, to be...
Read more >Functions - TypeScript: Handbook
Of note, only the parameters and the return type make up the function type. Captured variables are not reflected in the type. In...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gavinking I cloned it again and this time it works! Thanks!
This is now basically done, on the
6615
branch.