Skip to content

Vue 3.3 causing unresolved types to fail build when using props destructuring with a default value #8326

Closed
@kalvenschraut

Description

@kalvenschraut

Vue version

3.3.2

Link to minimal reproduction

https://github.com/kalvenschraut/vue-unresolved-types-build-failure

Steps to reproduce

See README in the repo.

What is expected?

Build to resolve the type in 3.3, or if can not be resolved do not fail build

What is actually happening?

Type is inferred to be ['null'] which is not the UNKNOWN_TYPE so causes the build to fail.

I think


needs to check for 'null' instead of UNKNOWN_TYPE.

Unknown TYPE should not exist in the array due to to being set to ['null' ]

Also I would expect my type to be resolved, but that could be considered a separate issue I can open with the same reproduction if it needs to be.

System Info

System:
    OS: Linux 5.15 Gentoo Linux
    CPU: (4) x64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
    Memory: 19.12 GB / 26.78 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.12.1 - /usr/bin/node
    Yarn: 3.3.0 - /usr/bin/yarn
    npm: 8.19.2 - /usr/bin/npm
    Watchman: 2023.01.16.00 - /usr/bin/watchman
  Browsers:
    Firefox: 102.7.0esr
  npmPackages:
    vue: 3.3.2 => 3.3.2

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