onTeardown and OnChangeEventHandler requires you to return a Promise. If you have an eventHandler that doesn't need to be async, @typescript-eslint/require-await will make it unnecessarily ugly, like wrapping it in a Promise, awaiting a noop, disabling the lint rule for one line.
onTeardown and OnChangeEventHandler requires you to return a Promise. If you have an eventHandler that doesn't need to be async,
@typescript-eslint/require-await
will make it unnecessarily ugly, like wrapping it in aPromise
, awaiting a noop, disabling the lint rule for one line.Expected Behavior
This, to be fine
Current Behavior
Possible Solution
I suggest changing the return type to
type Awaitable<T> = T | PromiseLike<T>;
if you don't use.then
s internally