Expected ")" but found ":"
Vue version
3.2.39
Link to minimal reproduction
https://github.com/vaban-ru/vue-tsc-reproduction-issue
Steps to reproduce
yarn install
yarn build
What is expected?
Expected clean build the library without errors
What is actually happening?
[vite:esbuild] Transform failed with 1 error:
C:/dev/test/vue-tsc-issue-reproduction/src/components/Base/SvButton/SvButton.vue?vue&type=script&setup=true&lang.ts:65:59: ERROR: Expected ")" but found ":"
file: C:/dev/test/vue-tsc-issue-reproduction/src/components/Base/SvButton/SvButton.vue?vue&type=script&setup=true&lang.ts:65:59
Expected ")" but found ":"
63 | },
64 | emits: ["click"],
65 | setup(__props: any, { emit }: { emit: ( "btn--primary": props.primary,
| ^
66 | "bt), expose: any, slots: any, attrs: any }) {
67 |
System Info
System:
OS: Windows 10 10.0.19044
CPU: (8) x64 Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz
Memory: 3.33 GB / 15.77 GB
Binaries:
Node: 14.18.3 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD
npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (105.0.1343.33)
Internet Explorer: 11.0.19041.1566
npmPackages:
vue: ^3.2.39 => 3.2.39
Any additional comments?
Additional libraries:
"typescript": "^4.8.3",
"vite": "^3.1.0",
"vue": "^3.2.39",
"vue-tsc": "^0.40.13",
"@vitejs/plugin-vue": "^3.1.0",
Very similar to this issue: https://github.com/vuejs/core/issues/5830
duplicate of https://github.com/vuejs/core/issues/5830