commit
This commit is contained in:
parent
be4fd23bcf
commit
0bd53741af
728 changed files with 86573 additions and 0 deletions
21
node_modules/telegraf/typings/router.d.ts
generated
vendored
Normal file
21
node_modules/telegraf/typings/router.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
/** @format */
|
||||
import { Middleware, MiddlewareObj } from './middleware';
|
||||
import Context from './context';
|
||||
declare type NonemptyReadonlyArray<T> = readonly [T, ...T[]];
|
||||
declare type RouteFn<TContext extends Context> = (ctx: TContext) => {
|
||||
route: string;
|
||||
context?: Partial<TContext>;
|
||||
state?: Partial<TContext['state']>;
|
||||
} | null;
|
||||
/** @deprecated in favor of {@link Composer.dispatch} */
|
||||
export declare class Router<C extends Context> implements MiddlewareObj<C> {
|
||||
private readonly routeFn;
|
||||
handlers: Map<string, Middleware<C>>;
|
||||
private otherwiseHandler;
|
||||
constructor(routeFn: RouteFn<C>, handlers?: Map<string, Middleware<C>>);
|
||||
on(route: string, ...fns: NonemptyReadonlyArray<Middleware<C>>): this;
|
||||
otherwise(...fns: NonemptyReadonlyArray<Middleware<C>>): this;
|
||||
middleware(): import("./middleware").MiddlewareFn<C>;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=router.d.ts.map
|
Loading…
Add table
Add a link
Reference in a new issue