Options
All
  • Public
  • Public/Protected
  • All
Menu

Project telegraf.js

Index

Type aliases

Middleware

Middleware<C>: MiddlewareFn<C> | MiddlewareObj<C>

Type parameters

MiddlewareFn

MiddlewareFn<C>: (ctx: C, next: () => Promise<void>) => Promise<unknown> | void

Type parameters

Type declaration

    • (ctx: C, next: () => Promise<void>): Promise<unknown> | void
    • Parameters

      • ctx: C
      • next: () => Promise<void>
          • (): Promise<void>
          • Returns Promise<void>

      Returns Promise<unknown> | void

Functions

session

  • session<S>(options?: SessionOptions<S>): MiddlewareFn<SessionContext<S>>
  • Type parameters

    • S: object

    Parameters

    • Optional options: SessionOptions<S>

    Returns MiddlewareFn<SessionContext<S>>

Generated using TypeDoc