__vccOpts: ComponentOptions
}
-export type Component = ComponentOptions | FunctionalComponent<any>
+export type Component = ComponentOptions | FunctionalComponent<any, any>
// A type used in public APIs where a component type is expected.
// The constructor type is an artificial type returned by defineComponent().
-import { FunctionalComponent, expectError, expectType } from './index'
+import {
+ FunctionalComponent,
+ expectError,
+ expectType,
+ Component
+} from './index'
// simple function signature
const Foo = (props: { foo: number }) => props.foo
expectError(<Bar foo="bar" />)
// @ts-expect-error
expectError(<Foo baz="bar" />)
+
+const Baz: FunctionalComponent<{}, string[]> = (props, { emit }) => {
+ expectType<{}>(props)
+ expectType<(event: string) => void>(emit)
+}
+
+expectType<Component>(Baz)