Skip to content

Incorrect type inferring with generic components and withDefaults #8325

Closed
@grindpride

Description

@grindpride

Vue version

3.3.2

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-nwkbil?file=src/components/ListGeneric.vue

Steps to reproduce

Steps to reproduce

  1. Open a new Terminal after successful setup of dependencies
  2. type and run npm run typecheck into the terminal
  3. See an error in ListGeneric.vue file

What is expected?

There is no error occurred

What is actually happening?

TS error

TS2345: Argument of type '{ sameModel: string; }' is not assignable to parameter of type 'InferDefaults<DefineProps<{ modelValue: T; sameModel?: T | undefined; }>>'.

System Info

No response

Any additional comments?

No response

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