Add the authentication strategy options (authStrategy
, auth
) and make the types for auth
depend on what authStrategy
is set to, either as part of the same options object or via .defaults()
#18
Labels
I made the show on the topic: gr2m/helpdesk#29
An approach that eventually worked: TypeScript playground
The goal here is
If
authStrategy
is not set, requireauth
to be set to a string (token)If
authStrategy
is set, make sure it adheres to a common interface:.hook
property that can be used to hook into the request lifecycleand derive the types for
auth
from the strategy function optionsMake it work for custom classes created with
.withDefaults()
, e.g.The text was updated successfully, but these errors were encountered: