diff --git a/packages/dts-test/defineComponent.test-d.tsx b/packages/dts-test/defineComponent.test-d.tsx index 41646751b8b..cfba9b4904b 100644 --- a/packages/dts-test/defineComponent.test-d.tsx +++ b/packages/dts-test/defineComponent.test-d.tsx @@ -2,6 +2,7 @@ import { type Component, type ComponentOptions, type ComponentPublicInstance, + type FunctionalContext, type PropType, type SetupContext, type Slots, @@ -1290,6 +1291,72 @@ describe('function syntax w/ generics', () => { ) }) +describe('function syntax w/ resolveType plugin', () => { + const Comp = defineComponent( + // jsx plugin resolveType is true + ( + props: { msg: T; list: T[] }, + ctx: FunctionalContext< + { + (key: 'foo', args1: string): any + (key: 'bar', args1: number): any + }, + { + foo: (args1: string, args2: number) => any + default: () => any + } + >, + ) => { + // use Composition API here like in