grammY
grammY copied to clipboard
bug: Type 'MyContext' does not satisfy the constraint 'Context'. Types of property 'has' are incompatible.
Hello!
I get the error Type 'MyContext' does not satisfy the constraint 'Context'. Types of property 'has' are incompatible. when I try to create a new Bot. The problem only happens with version 1.10 of Grammy and not with the 1.9.2 version.
type MyContext = HydrateFlavor<Context> & SessionFlavor<SessionData>
type MyApi = HydrateApiFlavor<Api>
export const bot = new Bot<MyContext, MyApi>(`${process.env.BOT_TOKEN}`)

Thanks.
Having the same issue. 1.9.2 works fine.
Misclick.
Anyways, is this Node.js or Deno?
Anyways, is this Node.js or Deno?
Node.js.
Have you tried upgrading the dependencies?
Have you tried upgrading the dependencies?
Yes I did.