mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-03-28 04:13:44 +03:00
refactor(types): use exported options types (#232)
This commit is contained in:
parent
0c50fca66e
commit
0b8819665a
@ -1,12 +1,11 @@
|
||||
import { ModuleMetadata, Type } from '@nestjs/common/interfaces';
|
||||
import { Middleware } from 'telegraf';
|
||||
import { LaunchOptions, TelegrafOptions } from '../types';
|
||||
import { Middleware, Telegraf } from 'telegraf';
|
||||
|
||||
export interface TelegrafModuleOptions {
|
||||
token: string;
|
||||
botName?: string;
|
||||
options?: TelegrafOptions;
|
||||
launchOptions?: LaunchOptions;
|
||||
options?: Telegraf.Options<any>;
|
||||
launchOptions?: Telegraf.LaunchOptions;
|
||||
include?: Function[];
|
||||
middlewares?: ReadonlyArray<Middleware<any>>;
|
||||
}
|
||||
|
@ -16,6 +16,3 @@ export type ComposerMethodArgs<
|
||||
T extends Composer<never>,
|
||||
U extends OnlyFunctionPropertyNames<T> = OnlyFunctionPropertyNames<T>
|
||||
> = Filter<Parameters<T[U]>, Middleware<never>>;
|
||||
|
||||
export type LaunchOptions = Parameters<Telegraf['launch']>[0];
|
||||
export type TelegrafOptions = ConstructorParameters<typeof Telegraf>[1];
|
||||
|
Loading…
Reference in New Issue
Block a user