I don't anticipate the return value to be checked at any point in the future, thus allowing users to return whatever they want from the promise should be fine.
See this error for motivation:
I'd argue it's generally good practice to allow user-defined callbacks to return anything, which is commonly done by annotating the return type as unknown. This holds as long as no shenanigans like (...) => typeof preventSubmit are planned.
I don't anticipate the return value to be checked at any point in the future, thus allowing users to return whatever they want from the promise should be fine.
See this error for motivation:
I'd argue it's generally good practice to allow user-defined callbacks to return
any
thing, which is commonly done by annotating the return type asunknown
. This holds as long as no shenanigans like(...) => typeof preventSubmit
are planned.