Commands plugin typo in flavor installation
https://github.com/grammyjs/website/blob/f6442084c369729edc772129e69cb03008919560/site/docs/plugins/commands.md?plain=1#L107
type MyContext = CommandsFlavor<Context>;
and https://github.com/grammyjs/website/blob/f6442084c369729edc772129e69cb03008919560/site/docs/plugins/commands.md?plain=1#L115-L116
const loggedOutCommands = new CommandGroup<MyContext>();
const loggedInCommands = new CommandGroup<MyContext>();
Technically, type MyContext = Context & CommandsFlavor is equivalent to type MyContext = Context & CommandsFlavor<Context>, since CommandsFlavor provides a default Context type where the parameter type is not given - i.e. interface CommandsFlavor<C extends Context = Context> extends Context {}.
Is there any particular reason why we want the Context & part when CommandsFlavor already extends Context?
Circular types feels a bit weird to me. I'm not sure what to think of it.
Is there any particular reason why we want the Context & part when CommandsFlavor already extends Context?
as you pointed out: there isn't
Should actually be:
type MyContext = CommandsFlavor<Context>;