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

Vue 3.3.4, defineProps could not resolve globa types #9164

Closed
cchao123 opened this issue Sep 7, 2023 · 1 comment
Closed

Vue 3.3.4, defineProps could not resolve globa types #9164

cchao123 opened this issue Sep 7, 2023 · 1 comment

Comments

@cchao123
Copy link

cchao123 commented Sep 7, 2023

Vue version

3.3.4

Link to minimal reproduction

https://play.vuejs.org/#eNp9Uk1PwzAM/StRTkyaymG3sk3iY0JwgAl2IxxC65WMNIkSdxRN/e846T4qBPRQxfZ7z89OdvzSuWzbAM/5FKF2WiLMhZmeDwIKQ+GVQ6alqWaCYxCcBcDGUbWwJiBz3rrAZqyEtTKwjNH0Vts3qdN5fja66KFWQ6ZtdZYIo9ip1yYlPiZlwqxVlW2CNeRpR925MoVuShA8Zy/CMPoEr5J2VmbRyzhmX9Nf8MLWTmnwjw4V9YssUulZUmv7eZ9y6BtIjMR5h+Ljl/wmtDEn+NJDAL8lD8caSl8B9uXF8wO0dD4Wa1s2Ojn+s/gEtIsmeuxhV40pyfYAl9ze1c56VKZahUWLYMJhqGg0Irv93HSJ1/+MfrI7ySaJJ0xHGx8skvYNbezGdh3dljDKIPi1LIDJAtUWbiTK1ZeDg6oqcxbQkzmCk54wJRRaemC9ao87qQwexEHiJJz/aEKSe5PdN6Ba5UI=

Steps to reproduce

  1. in global.d.ts
export {};

declare global {
  interface GlobalProps {
    activeData: activeDataType;
  }
}
  1. using type
const props = defineProps<GlobalProps>();
  1. Error
    [@vue/compiler-sfc] Unresolvable type reference or unsupported built-in utility type

What is expected?

defineProps can use global types

What is actually happening?

[@vue/compiler-sfc] Unresolvable type reference or unsupported built-in utility type

System Info

System:
    OS: macOS 11.3.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 1.59 GB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.18.0 - /usr/local/bin/node
    Yarn: 1.22.18 - /usr/local/bin/yarn
    npm: 6.14.15 - /usr/local/bin/npm
    pnpm: 6.32.3 - /usr/local/bin/pnpm
  Browsers:
    Chrome: 116.0.5845.179
    Safari: 14.1

Any additional comments?

No response

@edison1105
Copy link
Member

see #8612 (comment)

@edison1105 edison1105 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 22, 2023
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