Hover on context in Line 21 (const { emitA } = useAEmitter(context);).
An error below is shown.
Argument of type 'SetupContext<{ a: () => true; b: () => true; }>' is not assignable to parameter of type 'SetupContext<{ a: () => boolean; }>'.
Property 'b' is missing in type '{ a: () => boolean; }' but required in type '{ a: () => true; b: () => true; }'.
Version
3.0.0
Reproduction link
https://codesandbox.io/s/vue3-emitsoption-covariance-x3okn
Steps to reproduce
context
in Line 21 (const { emitA } = useAEmitter(context);
).What is expected?
SetupContext<{ a: () => true, b: () => true }>
is assignable toSetupContext<{ a: () => true }>
.What is actually happening?
SetupContext<{ a: () => true, b: () => true }>
is not assignable toSetupContext<{ a: () => true }>
.typescript playground
The text was updated successfully, but these errors were encountered: