nestjs-telegraf/lib/interfaces/telegraf-options.interface.ts

21 lines
537 B
TypeScript
Raw Normal View History

2020-01-12 01:15:32 +03:00
import { ModuleMetadata, Type } from '@nestjs/common/interfaces'
export interface TelegrafModuleOptions {
token: string
sitePublicUrl?: string
}
export interface TelegrafOptionsFactory {
createTelegrafOptions(): TelegrafModuleOptions
2020-01-12 01:15:32 +03:00
}
export interface TelegrafModuleAsyncOptions
extends Pick<ModuleMetadata, 'imports'> {
useExisting?: Type<TelegrafOptionsFactory>
2020-01-12 01:15:32 +03:00
useClass?: Type<TelegrafOptionsFactory>
useFactory?: (
...args: any[]
) => Promise<TelegrafModuleOptions> | TelegrafModuleOptions
2020-01-12 01:15:32 +03:00
inject?: any[]
}