Subscribe on changes!

Vue 3.3.4, defineProps could not resolve globa types

avatar
Sep 7th 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