Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/corePublic

Regression in prop type checking of imported type literal unions #13847

Closed
Labels
🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.regressionscope: sfc
@dbohn

Description

@dbohn

Vue version

min. 3.5.19

Link to minimal reproduction

https://github.com/dbohn/vue-type-union-regression

Steps to reproduce

After checking out the reproduction repository, run

npm installnpm run build

Please note, that this issue persists up to the latest patch version. This can be checked by increasing the patch version in thepackage.json file and run the above steps again.

What is expected?

Up to Vue 3.5.18, the build succeeded without any issues, asright-end is a valid value of the importedPlacement type.

What is actually happening?

Build fails with the following error:

error during build:[vite:vue] [@vue/compiler-sfc] Default value of prop "placement" does not match declared type./.../vue-floating-default/src/components/HelloWorld.vue3  |  import { ref } from 'vue'4  |5  |  const {placement = 'right-end'} = defineProps<{ msg: string, placement?: Placement }>()   |                     ^^^^^^^^^^^6  |7  |  const validPlacement: Placement = 'right-end';

System Info

System:    OS: Linux 6.6 Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat)    CPU: (22) x64 Intel(R) Core(TM) Ultra 7 155H    Memory: 4.56 GB / 15.37 GB    Container: Yes    Shell: 5.9 - /bin/zsh  Binaries:    Node: 22.14.0 -~/.nvm/versions/node/v22.14.0/bin/node    npm: 10.9.2 -~/.nvm/versions/node/v22.14.0/bin/npm  npmPackages:    vue: 3.5.19 => 3.5.19

Any additional comments?

We have a set of components, that usefloating-ui for positioning. We are using a similarplacement parameter in these components to set the initial positioning of our floating component.
After updating to the latest patch version of Vue, we ran into these issues.
Interestingly, thevue-tsc invocation within the build command does not produce an error here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.regressionscope: sfc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp