async method named "get"
See original GitHub issueWhen you name a async method get
and try to decorate it, it will get called whenever it is referenced and not function as expected.
let decorator = target => {
return target;
};
class Example {
@decorator async get () {
console.log('called');
}
}
let instance = new Example();
typeof instance.get;
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Get current method name from async function? - Stack Overflow
You need to capture the method name early in the async method, somewhere before the first async call. The most ...
Read more >Task asynchronous programming model - Microsoft Learn
The method name ends in Async . In the body of the method, GetStringAsync returns a Task<string> . That means that when you...
Read more >async function - JavaScript - MDN Web Docs - Mozilla
The async function declaration declares an async function where the await keyword is permitted within the function body. The async and await ...
Read more >4. Writing Async Methods - Async in C# 5.0 [Book] - O'Reilly
An async method isn't automatically asynchronous. Async methods just make it easier to consume other asynchronous methods. They start running synchronously, ...
Read more >Getting Started | Creating Asynchronous Methods - Spring
This class also customizes the Executor by defining a new bean. Here, the method is named taskExecutor , since this is the specific...
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
Oh you’re right about
function
in that case, that’s probably just an extreme edge case in the spec then.If you wanted to replace the function, the easiest option would be to do
Thanks, this is the best way to do it!