Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defineOptions type regression in v3.5.0-alpha.1 #10841

Closed
cexbrayat opened this issue Apr 30, 2024 · 1 comment
Closed

defineOptions type regression in v3.5.0-alpha.1 #10841

cexbrayat opened this issue Apr 30, 2024 · 1 comment

Comments

@cexbrayat
Copy link
Member

Vue version

3.5.0-alpha.1

Link to minimal reproduction

https://play.vuejs.org/#eNp9kdFLwzAQxv+VMy9V2FrH9GV0A5WB+qCigi8BKe2160yTkKR1UPq/e0nd3IPsLff9vst9l/TsRuu4a5EtWGpzU2sHFl2rV1zWjVbGQQ8GSxigNKqBiKwRlwWWtcRn7Wol7XkPMmtwAdE9CqEiGC645DIn5KCxFSz9DecjhQ9lRHEWkSVNxoE0igqHjRaZQ6oA0s1s1feheRjShKqg1lK3DrppowoUS86IcwYJwTQ56mcT5iyNL+sq3lolabfe93OWq0bXAs1vcs4WEIhnGaX7fgyaMy1O9nq+wfzrH31rd17j7MWgRdMhZwfmMlOhG/H67Ql3dD5ASt8Kcp+Ar2iVaH3G0XbbyoJiH/lC2ofwQ7Ws3u1651Da/VI+qHcOwc8Z/drdidX/4s7jq9DH5UCv+Nmh8XfSA87j6/hymgm9yeIZG34A3Be69Q==

Steps to reproduce

defineOptions no longer compiles properly in TS when using v3.5.0-alpha.1

defineOptions({ name: 'Hello' })

What is expected?

Compilation should be OK

What is actually happening?

error TS2345: Argument of type '{ name: string; }' is not assignable to parameter of type 'ComponentOptionsBase<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions> & { ...; }'.
  Property 'props' is missing in type '{ name: string; }' but required in type '{ props: never; emits?: undefined; expose?: undefined; slots?: undefined; }'.

3 defineOptions({ name: 'Hello' });

System Info

System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 1.04 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.20.1 - ~/.volta/tools/image/node/18.20.1/bin/node
    Yarn: 1.22.17 - ~/.volta/tools/image/yarn/1.22.17/bin/yarn
    npm: 9.7.1 - ~/.volta/tools/image/npm/9.7.1/bin/npm
    pnpm: 9.0.6 - ~/.volta/bin/pnpm
  Browsers:
    Chrome: 124.0.6367.91
    Safari: 17.4.1
  npmPackages:
    vue: 3.5.0-alpha.1 => 3.5.0-alpha.1

Any additional comments?

No response

@yyx990803
Copy link
Member

closed via 124c4ca

@github-actions github-actions bot locked and limited conversation to collaborators May 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants