Using any as the return type for csrfProtection made it incompatible with addHook, because csrfProtection was interpreted as an async hook with 3 params, which is not allowed.
Instead void seems like the appropriate return type because the function is only invoked for its side-effects.
Checklist
npm run test
andnpm run benchmark
Using
any
as the return type forcsrfProtection
made it incompatible withaddHook
, becausecsrfProtection
was interpreted as an async hook with 3 params, which is not allowed.Instead
void
seems like the appropriate return type because the function is only invoked for its side-effects.