You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the tsserver gives a warning/quick fix about unnecessary awaits (TS80007). However, there is no configuration to cause the build to error on such cases.
Use Cases
This would allow PR/CI builds to catch cases where an await is used unnecessarily, which can cause significant added code weight when targeting ES versions that do not support native async/await.
Checklist
My suggestion meets these guidelines:
This wouldn't be a breaking change in existing TypeScript/JavaScript code
Depending on how you define added restrictions to strict mode, this could be considered breaking
This wouldn't change the runtime behavior of existing JavaScript code
This could be implemented without emitting different JS based on the types of the expressions
This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
Search Terms
TS80007, unnecessary await
Suggestion
Currently, the tsserver gives a warning/quick fix about unnecessary awaits (TS80007). However, there is no configuration to cause the build to error on such cases.
Use Cases
This would allow PR/CI builds to catch cases where an
await
is used unnecessarily, which can cause significant added code weight when targeting ES versions that do not support nativeasync
/await
.Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: