mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2024-12-24 15:04:38 +03:00
reafctor(): remove unused code & add exports
This commit is contained in:
parent
8c72790226
commit
306f239603
@ -1,7 +1,7 @@
|
||||
import { SetMetadata } from '@nestjs/common';
|
||||
import { UpdateMethodArgs, UpdateMethods } from '../telegraf.types';
|
||||
import { UPDATE_LISTENER_METADATA } from '../telegraf.constants';
|
||||
import { ListenerMetadata } from '../interfaces/listener-metadata.interface';
|
||||
import { ListenerMetadata } from '../interfaces';
|
||||
|
||||
export function createUpdateDecorator<Method extends UpdateMethods>(
|
||||
method: Method,
|
||||
|
1
lib/helpers/index.ts
Normal file
1
lib/helpers/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './create-update-decorator.helper';
|
@ -1,3 +1,5 @@
|
||||
export * from './decorators';
|
||||
export * from './interfaces';
|
||||
export * from './helpers';
|
||||
export * from './telegraf.module';
|
||||
export * from './telegraf.types';
|
||||
|
@ -1 +1,2 @@
|
||||
export * from './telegraf-options.interface';
|
||||
export * from './listener-metadata.interface';
|
||||
|
@ -1,4 +1,3 @@
|
||||
export const STAGE_MIDDLEWARE = 'StageMiddleware';
|
||||
export const TELEGRAF_MODULE_OPTIONS = 'TELEGRAF_MODULE_OPTIONS';
|
||||
|
||||
export const UPDATE_METADATA = 'UPDATE_METADATA';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Provider } from '@nestjs/common';
|
||||
import { session, Telegraf } from 'telegraf';
|
||||
import { Telegraf } from 'telegraf';
|
||||
import { TELEGRAF_MODULE_OPTIONS } from './telegraf.constants';
|
||||
import { TelegrafModuleOptions } from './interfaces';
|
||||
|
||||
|
@ -16,9 +16,6 @@ export type UpdateMethodArgs<T extends UpdateMethods> = Filter<
|
||||
Parameters<Composer<never>[T]>,
|
||||
Middleware<any>
|
||||
>;
|
||||
// type Test0 = Filter<[['foo', 'bar', 'booz'], ...Middleware<any>[]], Middleware<any>>;
|
||||
// type Test1 = UpdateMethodArgs<'on'>;
|
||||
// type Test2 = Parameters<Composer<never>['on']>;
|
||||
|
||||
export type TelegrafOption = ConstructorParameters<typeof Telegraf>[1];
|
||||
export type TelegrafLaunchOption = Parameters<Telegraf['launch']>[0];
|
||||
|
Loading…
Reference in New Issue
Block a user