🐛 noConfusingVoidType
: allow Promise<void> | void
#604
Labels
A-Linter
Area: linter
L-JavaScript
Language: JavaScript and super languages
S-Enhancement
Status: Improve an existing feature
Environment information
What happened?
We use this pattern in our codebase, we pass functions that may or may not be async, so
Promise<void>
return type for async functions, combined with the no-floating-promises allows us to ensure we don't forget toawait
itvoid
return type for sync functions, otherwise TS would complainExpected result
no-invalid-void-type considers this union to be valid, but Biome doesn't. I'd expect parity.
Code of Conduct
The text was updated successfully, but these errors were encountered: