mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2024-12-25 15:34: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 { SetMetadata } from '@nestjs/common';
|
||||||
import { UpdateMethodArgs, UpdateMethods } from '../telegraf.types';
|
import { UpdateMethodArgs, UpdateMethods } from '../telegraf.types';
|
||||||
import { UPDATE_LISTENER_METADATA } from '../telegraf.constants';
|
import { UPDATE_LISTENER_METADATA } from '../telegraf.constants';
|
||||||
import { ListenerMetadata } from '../interfaces/listener-metadata.interface';
|
import { ListenerMetadata } from '../interfaces';
|
||||||
|
|
||||||
export function createUpdateDecorator<Method extends UpdateMethods>(
|
export function createUpdateDecorator<Method extends UpdateMethods>(
|
||||||
method: Method,
|
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 './decorators';
|
||||||
export * from './interfaces';
|
export * from './interfaces';
|
||||||
|
export * from './helpers';
|
||||||
export * from './telegraf.module';
|
export * from './telegraf.module';
|
||||||
|
export * from './telegraf.types';
|
||||||
|
@ -1 +1,2 @@
|
|||||||
export * from './telegraf-options.interface';
|
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 TELEGRAF_MODULE_OPTIONS = 'TELEGRAF_MODULE_OPTIONS';
|
||||||
|
|
||||||
export const UPDATE_METADATA = 'UPDATE_METADATA';
|
export const UPDATE_METADATA = 'UPDATE_METADATA';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Provider } from '@nestjs/common';
|
import { Provider } from '@nestjs/common';
|
||||||
import { session, Telegraf } from 'telegraf';
|
import { Telegraf } from 'telegraf';
|
||||||
import { TELEGRAF_MODULE_OPTIONS } from './telegraf.constants';
|
import { TELEGRAF_MODULE_OPTIONS } from './telegraf.constants';
|
||||||
import { TelegrafModuleOptions } from './interfaces';
|
import { TelegrafModuleOptions } from './interfaces';
|
||||||
|
|
||||||
|
@ -16,9 +16,6 @@ export type UpdateMethodArgs<T extends UpdateMethods> = Filter<
|
|||||||
Parameters<Composer<never>[T]>,
|
Parameters<Composer<never>[T]>,
|
||||||
Middleware<any>
|
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 TelegrafOption = ConstructorParameters<typeof Telegraf>[1];
|
||||||
export type TelegrafLaunchOption = Parameters<Telegraf['launch']>[0];
|
export type TelegrafLaunchOption = Parameters<Telegraf['launch']>[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user