You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this code, the app constant given to myFunction will be flagged with the following type error:
Argument of type 'Application<{ foo: string; }>' is not assignable to parameter of type 'Application<Record<string, any>>'.
Types of property '#composedMiddleware' are incompatible.
Type '((context: Context<{ foo: string; }, { foo: string; }>) => Promise<unknown>) | undefined' is not assignable to type '((context: Context<Record<string, any>, Record<string, any>>) => Promise<unknown>) | undefined'.
Type '(context: Context<{ foo: string; }, { foo: string; }>) => Promise<unknown>' is not assignable to type '(context: Context<Record<string, any>, Record<string, any>>) => Promise<unknown>'.
Types of parameters 'context' and 'context' are incompatible.
Type 'Context<Record<string, any>, Record<string, any>>' is not assignable to type 'Context<{ foo: string; }, { foo: string; }>'.
Type 'Record<string, any>' is not assignable to type '{ foo: string; }'.
Despite the probable simplicity of the error, I could't find a way to fix it. I'll try a bit longer but if anybody find it, a pull request will save my day x)
Activity
Ettapp commentedon May 6, 2024
One way to make the error vanish:
It does not solve the issue but masks the symptom away
Ettapp commentedon May 6, 2024
I closed the issue thinking I found the problem but I was mistaken