Script setup "withDefaults" generates wrong code
Version
3.2.8
Reproduction link
Steps to reproduce
- Create file with
script setup
- paste
withDefaults(
defineProps<{
phones: Stored<Phone[]>;
title?: string;
callable?: boolean;
}>(),
{
title: "Телефоны",
}
);
To reproduce with git reproduction, run npm run build
after npm install
What is expected?
compiled code:
const props = __props as { phones: Stored<Phone[]>, title: string, callable?: boolean }
What is actually happening?
compiled code:
const props = __props as { phones: Stored<Phone[]>;, title: string, callable?: boolean; }
esbuild is giving me this error, but it goes from wrong compiled code
Duplicate of https://github.com/vuejs/vue-next/issues/4505