mirror of
https://github.com/Maks1mS/nestjs-telegraf.git
synced 2025-09-30 12:27:39 +03:00
initial commit
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
import { createTelegrafParamDecorator } from '../../utils/param-decorator.util';
|
||||
import { TelegrafParamtype } from '../../enums/telegraf-paramtype.enum';
|
||||
|
||||
export const Context: () => ParameterDecorator = createTelegrafParamDecorator(
|
||||
TelegrafParamtype.CONTEXT,
|
||||
);
|
||||
|
||||
export const Ctx = Context;
|
@@ -1,4 +0,0 @@
|
||||
export * from './context.decorator';
|
||||
export * from './next.decorator';
|
||||
export * from './message.decorator';
|
||||
export * from './sender.decorator';
|
@@ -1,21 +0,0 @@
|
||||
import { PipeTransform, Type } from '@nestjs/common';
|
||||
import { createTelegrafPipesParamDecorator } from '../../utils/param-decorator.util';
|
||||
import { TelegrafParamtype } from '../../enums/telegraf-paramtype.enum';
|
||||
|
||||
export function Message(): ParameterDecorator;
|
||||
export function Message(
|
||||
...pipes: (Type<PipeTransform> | PipeTransform)[]
|
||||
): ParameterDecorator;
|
||||
export function Message(
|
||||
property: string,
|
||||
...pipes: (Type<PipeTransform> | PipeTransform)[]
|
||||
): ParameterDecorator;
|
||||
export function Message(
|
||||
property?: string | (Type<PipeTransform> | PipeTransform),
|
||||
...pipes: (Type<PipeTransform> | PipeTransform)[]
|
||||
) {
|
||||
return createTelegrafPipesParamDecorator(TelegrafParamtype.MESSAGE)(
|
||||
property,
|
||||
...pipes,
|
||||
);
|
||||
}
|
@@ -1,6 +0,0 @@
|
||||
import { createTelegrafParamDecorator } from '../../utils/param-decorator.util';
|
||||
import { TelegrafParamtype } from '../../enums/telegraf-paramtype.enum';
|
||||
|
||||
export const Next: () => ParameterDecorator = createTelegrafParamDecorator(
|
||||
TelegrafParamtype.NEXT,
|
||||
);
|
@@ -1,21 +0,0 @@
|
||||
import { PipeTransform, Type } from '@nestjs/common';
|
||||
import { createTelegrafPipesParamDecorator } from '../../utils/param-decorator.util';
|
||||
import { TelegrafParamtype } from '../../enums/telegraf-paramtype.enum';
|
||||
|
||||
export function Sender(): ParameterDecorator;
|
||||
export function Sender(
|
||||
...pipes: (Type<PipeTransform> | PipeTransform)[]
|
||||
): ParameterDecorator;
|
||||
export function Sender(
|
||||
property: string,
|
||||
...pipes: (Type<PipeTransform> | PipeTransform)[]
|
||||
): ParameterDecorator;
|
||||
export function Sender(
|
||||
property?: string | (Type<PipeTransform> | PipeTransform),
|
||||
...pipes: (Type<PipeTransform> | PipeTransform)[]
|
||||
) {
|
||||
return createTelegrafPipesParamDecorator(TelegrafParamtype.SENDER)(
|
||||
property,
|
||||
...pipes,
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user