Closed
Description
Search Terms
- return type quick fix
- async function quick fix
- global promise type
Suggestion
It would be nice if TypeScript contributed a quick fix to resolve The return type of an async or global function must be the global Promise<T> type
errors. The fix would simply wrap the existing return type into a Promise.
Checklist
My suggestion meets these guidelines:
- [x ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
- [ x] This wouldn't change the runtime behavior of existing JavaScript code
- [ x] This could be implemented without emitting different JS based on the types of the expressions
- [x ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
- [x ] This feature would agree with the rest of TypeScript's Design Goals.