feat(): disabling global catch support

This commit is contained in:
Alexander Bukhalo
2021-01-02 02:00:10 +03:00
parent 3d7ecbd7f2
commit 03b17a0cdb
4 changed files with 41 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
import { TelegrafContext } from 'telegraf/typings/context';
export interface Context extends TelegrafContext {
[key: string]: any;
[key: string]: any; // TBD
}
/**

View File

@@ -5,6 +5,7 @@ import {
LaunchWebhookOptions,
} from 'telegraf/typings/telegraf';
import { Middleware } from 'telegraf/typings/composer';
import { Context } from './context.interface';
export interface TelegrafModuleOptions {
token: string;
@@ -15,7 +16,8 @@ export interface TelegrafModuleOptions {
};
botName?: string;
include?: Function[];
middlewares?: ReadonlyArray<Middleware<any>>;
middlewares?: ReadonlyArray<Middleware<Context>>;
disableGlobalCatch?: boolean;
}
export interface TelegrafOptionsFactory {