mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2024-12-25 15:34:38 +03:00
22 lines
592 B
TypeScript
22 lines
592 B
TypeScript
import { ModuleMetadata, Type } from '@nestjs/common/interfaces';
|
|
import { TelegrafOptions } from 'telegraf';
|
|
|
|
export interface TelegrafModuleOptions {
|
|
token: string;
|
|
options?: TelegrafOptions;
|
|
}
|
|
|
|
export interface TelegrafOptionsFactory {
|
|
createTelegrafOptions(): TelegrafModuleOptions;
|
|
}
|
|
|
|
export interface TelegrafModuleAsyncOptions
|
|
extends Pick<ModuleMetadata, 'imports'> {
|
|
useExisting?: Type<TelegrafOptionsFactory>;
|
|
useClass?: Type<TelegrafOptionsFactory>;
|
|
useFactory?: (
|
|
...args: any[]
|
|
) => Promise<TelegrafModuleOptions> | TelegrafModuleOptions;
|
|
inject?: any[];
|
|
}
|