Skip to main content

context

Callable

  • context<IUserOrContext, Ctx, _User_, _Context_>(__namedParameters: { req: IncomingMessage; request?: undefined } | { req?: undefined; request: Request | Request<IncomingMessage, RequestContext> }, __namedParameters: AccountsContextOptions<Ctx>): Promise<_Context_>

  • Type parameters

    • IUserOrContext: object = User
    • Ctx: object = object
    • _User_: User = IUserOrContext extends User ? IUserOrContext : User
    • _Context_: object = IUserOrContext extends User ? IContext<IUserOrContext> : IUserOrContext

    Parameters

    • __namedParameters: { req: IncomingMessage; request?: undefined } | { req?: undefined; request: Request | Request<IncomingMessage, RequestContext> }
    • __namedParameters: AccountsContextOptions<Ctx>

    Returns Promise<_Context_>