Options
All
  • Public
  • Public/Protected
  • All
Menu

telegraf.js - v4.4.2

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

NarrowedContext

NarrowedContext<C, U>: Context<U> & Omit<C, keyof Context>

Narrows down C['update'] (and derived getters) to specific update type U.

Used by Composer, possibly useful for splitting a bot into multiple files.

Type parameters

Functions

deunionize

  • deunionize<T>(t: T): Deunionize<T, T>

session

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

Generated using TypeDoc