telegraf / telegraf-session-redis

Redis session middleware for Telegraf
MIT License
50 stars 25 forks source link

Error in Typings #21

Open lamuertepeluda opened 4 years ago

lamuertepeluda commented 4 years ago

Hello,

I see getContext typings seems wrong: https://github.com/telegraf/telegraf-session-redis/blob/develop/lib/session.d.ts#L39

It is:

getSession(key: Context): string;

but I expected it to be:

getSession(key: string): Context;

and in the code it seems to work like the latter, i.e. returning an object.

dalechyn commented 4 years ago

Check out this fork: https://github.com/igorivaniuk/telegraf-session-redis