nestjs-telegraf icon indicating copy to clipboard operation
nestjs-telegraf copied to clipboard

dont work

Open Form1ca opened this issue 1 year ago • 1 comments

"@nestjs/core": "8.4.1", "nestjs-telegraf": "^2.6.1", "telegraf": "^4.9.1", "typescript": "^4.8.2"

`node_modules/nestjs-telegraf/dist/types/index.d.ts:6:158 - error TS2344: Type 'T[U]' does not satisfy the constraint '(...args: any) => any'. Type 'T[OnlyFunctionPropertyNames<T>]' is not assignable to type '(...args: any) => any'. Type 'T[T[keyof T] extends (...args: any) => any ? keyof T : never]' is not assignable to type '(...args: any) => any'. Type 'T[keyof T]' is not assignable to type '(...args: any) => any'. Type 'T[string] | T[number] | T[symbol]' is not assignable to type '(...args: any) => any'. Type 'T[string]' is not assignable to type '(...args: any) => any'.

6 export declare type ComposerMethodArgs<T extends Composer, U extends OnlyFunctionPropertyNames<T> = OnlyFunctionPropertyNames<T>> = Filter<Parameters<T[U]>, Middleware>;`

Form1ca avatar Sep 08 '22 08:09 Form1ca

Try to downgrade Typescript version https://github.com/hypeertech/nestjs-telegraf/issues/362#issuecomment-1076249546.

I have already fixed this bug, but this fix will be in the next version (probably).

Maks1mS avatar Sep 08 '22 08:09 Maks1mS

@Form1ca please, update to nestjs-telegraf v2.6.2. This problem fixed by @Maks1mS in that version.

evilsprut avatar Sep 20 '22 09:09 evilsprut