Skip to content

DefineComponent<typeof MyPropsObject> ruturn ComponentPublicInstanceConstructo<any, any, ...> #2192

Closed
@Jokcy

Description

@Jokcy

Version

3.0.0

Reproduction link

https://codesandbox.io/s/vue-3-ce53j?fontsize=14&hidenavigation=1&theme=dark

Steps to reproduce

I want to define my Component type using DefineComponent, something like:

type MyComponentType = DefineComponent<MyComponentPropsObject>

but the type returned is not correct, it returns ComponentPublicInstanceConstructo<any, any, ...>

What is expected?

return the correct type

What is actually happening?

return type not correct, it returns:

ComponentPublicInstanceConstructor<any, any, any, any, Record<string, ComputedGetter<any> | WritableComputedOptions<any>>, MethodOptions> & ComponentOptionsBase<...> & VNodeProps & AllowedComponentProps & ComponentCustomProps

did not find any online code editor support ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions