DefineProps import issue in v3.3.4
Vue version
3.3.4
Link to minimal reproduction
https://github.com/aravindhn94/vuetify_sample
Steps to reproduce
npm install npm run dev
What is expected?
No error during runtime.
I am trying to create a wrapper component over VTextField of vuetify. Adding few more props along with the props of VTextField. So naturally did intersection of two prop types. but this codeblock is causing issues during runtime:
const props = defineProps<
{
modelValue: TValue;
parser: (value: TFormattedValue) => TValue;
formatter: (value: TValue) => TFormattedValue;
} & Partial<ExtractPropTypes<VTextField>>
>();
What is actually happening?
[plugin:vite:vue] [@vue/compiler-sfc] Unresolvable type reference or unsupported built-in utility type
Getting above runtime error.
System Info
System:
OS: macOS 13.0
CPU: (10) arm64 Apple M2 Pro
Memory: 292.56 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.16.0 - /usr/local/bin/node
npm: 9.5.1 - /usr/local/bin/npm
Browsers:
Chrome: 114.0.5735.106
Safari: 16.1
npmPackages:
vue: ^3.3.4 => 3.3.4
Any additional comments?
No response
interface Props extends /* @vue-ignore */ Partial<ExtractPropTypes<VTextField>> {
modelValue: TValue;
parser: (value: TFormattedValue) => TValue;
formatter: (value: TValue) => TFormattedValue;
}
defineProps<Props>();
Hi. I have same issue. I think Vue 3.3.4 does not support right now. And does not work vue-ignore. who have solution? Thanks.
@SuleymanQ this should work:
declare const ConfigDefaults: {
colors: ColorDefaults
}
export type ConfigProps = typeof ConfigDefaults
const props = defineProps<Partial<ConfigProps>>()