From b59f696fc2f59da0104eb8924d8ffca98a69c3f2 Mon Sep 17 00:00:00 2001 From: ced Date: Thu, 17 Nov 2022 10:28:46 +0100 Subject: [PATCH] chore: update to typescript v4.9.2 Fixes #1872 Fixes the errors arising with script setup components: ``` tests/features/ScriptSetup_ToRefsInject.spec.ts:6:25 - error TS2769: No overload matches this call. The last overload gave the following error. Argument of type 'ComponentPublicInstanceConstructor<{ $: ComponentInternalInstance; $data: {}; $props: Partial<{}> & Omit>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>; ... 10 more ...; $watch any...' is not assignable to parameter of type 'ComponentOptionsWithObjectProps<__VLS_TypePropsToRuntimeProps<{ title: string; }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 5 more ..., {}>'. Type 'ComponentPublicInstanceConstructor<{ $: ComponentInternalInstance; $data: {}; $props: Partial<{}> & Omit>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>; ... 10 more ...; $watch any...' is not assignable to type 'ComponentOptionsBase>> & { [x: `on${Capitalize}`]: ((...args: any[]) => any) | undefined; }, ... 10 more ..., string>'. Types of property 'setup' are incompatible. Type '((this: void, props: Readonly>>>>, ctx: SetupContext<...>) => void | ... 2 more ... | Promise<...>) | undefined' is not assignable to type '((this: void, props: Readonly>> & { [x: `on${Capitalize}`]: ((...args: any[]) => any) | undefined; }>>, ctx: SetupContext<...>) => void | ... 2 more ... | Promise<...>) | undefined'. Type '(this: void, props: Readonly>>>>, ctx: SetupContext<...>) => void | ... 2 more ... | Promise<...>' is not assignable to type '(this: void, props: Readonly>> & { [x: `on${Capitalize}`]: ((...args: any[]) => any) | undefined; }>>, ctx: SetupContext<...>) => void | ... 2 more ... | Promise<...>'. Types of parameters 'ctx' and 'ctx' are incompatible. Type 'SetupContext' is not assignable to type 'SetupContext<{}>'. 6 const wrapper = mount(ScriptSetup_ToRefsInject, { ``` --- package.json | 2 +- pnpm-lock.yaml | 66 +++++++++++++++++++++++++------------------------- src/mount.ts | 2 +- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index ea432180b..6cd9942ff 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "reflect-metadata": "0.1.13", "rollup": "3.2.5", "tslib": "2.4.1", - "typescript": "4.8.4", + "typescript": "4.9.3", "unplugin-vue-components": "0.22.9", "vite": "3.2.3", "vitepress": "0.22.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4557ee62b..dc362dd43 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,7 +30,7 @@ specifiers: reflect-metadata: 0.1.13 rollup: 3.2.5 tslib: 2.4.1 - typescript: 4.8.4 + typescript: 4.9.3 unplugin-vue-components: 0.22.9 vite: 3.2.3 vitepress: 0.22.4 @@ -46,11 +46,11 @@ devDependencies: '@rollup/plugin-json': 5.0.1_rollup@3.2.5 '@rollup/plugin-node-resolve': 15.0.1_rollup@3.2.5 '@rollup/plugin-replace': 5.0.1_rollup@3.2.5 - '@rollup/plugin-typescript': 9.0.2_skqhbvp355vci76ty3pdffvjrq + '@rollup/plugin-typescript': 9.0.2_zvi5mf76duikkrx6zp62lgsvga '@types/js-beautify': 1.13.3 '@types/node': 18.11.9 - '@typescript-eslint/eslint-plugin': 5.42.1_2udltptbznfmezdozpdoa2aemq - '@typescript-eslint/parser': 5.42.1_rmayb2veg2btbq6mbmnyivgasy + '@typescript-eslint/eslint-plugin': 5.42.1_a76fwnskzo2n3ynumjbqxmyj7i + '@typescript-eslint/parser': 5.42.1_e3uo4sehh4zr4i6m57mkkxxv7y '@vitejs/plugin-vue': 3.2.0_vite@3.2.3+vue@3.2.45 '@vitejs/plugin-vue-jsx': 2.1.1_vite@3.2.3+vue@3.2.45 '@vitest/coverage-c8': 0.25.2_jsdom@20.0.2 @@ -71,7 +71,7 @@ devDependencies: reflect-metadata: 0.1.13 rollup: 3.2.5 tslib: 2.4.1 - typescript: 4.8.4 + typescript: 4.9.3 unplugin-vue-components: 0.22.9_rollup@3.2.5+vue@3.2.45 vite: 3.2.3_@types+node@18.11.9 vitepress: 0.22.4 @@ -79,7 +79,7 @@ devDependencies: vue: 3.2.45 vue-class-component: 8.0.0-rc.1_vue@3.2.45 vue-router: 4.1.6_vue@3.2.45 - vue-tsc: 1.0.9_typescript@4.8.4 + vue-tsc: 1.0.9_typescript@4.9.3 vuex: 4.1.0_vue@3.2.45 packages: @@ -717,7 +717,7 @@ packages: rollup: 3.2.5 dev: true - /@rollup/plugin-typescript/9.0.2_skqhbvp355vci76ty3pdffvjrq: + /@rollup/plugin-typescript/9.0.2_zvi5mf76duikkrx6zp62lgsvga: resolution: {integrity: sha512-/sS93vmHUMjzDUsl5scNQr1mUlNE1QjBBvOhmRwJCH8k2RRhDIm3c977B3wdu3t3Ap17W6dDeXP3hj1P1Un1bA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -734,7 +734,7 @@ packages: resolve: 1.22.1 rollup: 3.2.5 tslib: 2.4.1 - typescript: 4.8.4 + typescript: 4.9.3 dev: true /@rollup/pluginutils/5.0.2_rollup@3.2.5: @@ -795,7 +795,7 @@ packages: resolution: {integrity: sha512-WwA1MW0++RfXmCr12xeYOOC5baSC9mSb0ZqCquFzKhcoF4TvHu5MKOuXsncgZcpVFhB1pXd5hZmM0ryAoCp12A==} dev: true - /@typescript-eslint/eslint-plugin/5.42.1_2udltptbznfmezdozpdoa2aemq: + /@typescript-eslint/eslint-plugin/5.42.1_a76fwnskzo2n3ynumjbqxmyj7i: resolution: {integrity: sha512-LyR6x784JCiJ1j6sH5Y0K6cdExqCCm8DJUTcwG5ThNXJj/G8o5E56u5EdG4SLy+bZAwZBswC+GYn3eGdttBVCg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -806,23 +806,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.42.1_rmayb2veg2btbq6mbmnyivgasy + '@typescript-eslint/parser': 5.42.1_e3uo4sehh4zr4i6m57mkkxxv7y '@typescript-eslint/scope-manager': 5.42.1 - '@typescript-eslint/type-utils': 5.42.1_rmayb2veg2btbq6mbmnyivgasy - '@typescript-eslint/utils': 5.42.1_rmayb2veg2btbq6mbmnyivgasy + '@typescript-eslint/type-utils': 5.42.1_e3uo4sehh4zr4i6m57mkkxxv7y + '@typescript-eslint/utils': 5.42.1_e3uo4sehh4zr4i6m57mkkxxv7y debug: 4.3.4 eslint: 8.27.0 ignore: 5.2.0 natural-compare-lite: 1.4.0 regexpp: 3.2.0 semver: 7.3.7 - tsutils: 3.21.0_typescript@4.8.4 - typescript: 4.8.4 + tsutils: 3.21.0_typescript@4.9.3 + typescript: 4.9.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser/5.42.1_rmayb2veg2btbq6mbmnyivgasy: + /@typescript-eslint/parser/5.42.1_e3uo4sehh4zr4i6m57mkkxxv7y: resolution: {integrity: sha512-kAV+NiNBWVQDY9gDJDToTE/NO8BHi4f6b7zTsVAJoTkmB/zlfOpiEVBzHOKtlgTndCKe8vj9F/PuolemZSh50Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -834,10 +834,10 @@ packages: dependencies: '@typescript-eslint/scope-manager': 5.42.1 '@typescript-eslint/types': 5.42.1 - '@typescript-eslint/typescript-estree': 5.42.1_typescript@4.8.4 + '@typescript-eslint/typescript-estree': 5.42.1_typescript@4.9.3 debug: 4.3.4 eslint: 8.27.0 - typescript: 4.8.4 + typescript: 4.9.3 transitivePeerDependencies: - supports-color dev: true @@ -850,7 +850,7 @@ packages: '@typescript-eslint/visitor-keys': 5.42.1 dev: true - /@typescript-eslint/type-utils/5.42.1_rmayb2veg2btbq6mbmnyivgasy: + /@typescript-eslint/type-utils/5.42.1_e3uo4sehh4zr4i6m57mkkxxv7y: resolution: {integrity: sha512-WWiMChneex5w4xPIX56SSnQQo0tEOy5ZV2dqmj8Z371LJ0E+aymWD25JQ/l4FOuuX+Q49A7pzh/CGIQflxMVXg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -860,12 +860,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.42.1_typescript@4.8.4 - '@typescript-eslint/utils': 5.42.1_rmayb2veg2btbq6mbmnyivgasy + '@typescript-eslint/typescript-estree': 5.42.1_typescript@4.9.3 + '@typescript-eslint/utils': 5.42.1_e3uo4sehh4zr4i6m57mkkxxv7y debug: 4.3.4 eslint: 8.27.0 - tsutils: 3.21.0_typescript@4.8.4 - typescript: 4.8.4 + tsutils: 3.21.0_typescript@4.9.3 + typescript: 4.9.3 transitivePeerDependencies: - supports-color dev: true @@ -875,7 +875,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.42.1_typescript@4.8.4: + /@typescript-eslint/typescript-estree/5.42.1_typescript@4.9.3: resolution: {integrity: sha512-qElc0bDOuO0B8wDhhW4mYVgi/LZL+igPwXtV87n69/kYC/7NG3MES0jHxJNCr4EP7kY1XVsRy8C/u3DYeTKQmw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -890,13 +890,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.7 - tsutils: 3.21.0_typescript@4.8.4 - typescript: 4.8.4 + tsutils: 3.21.0_typescript@4.9.3 + typescript: 4.9.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils/5.42.1_rmayb2veg2btbq6mbmnyivgasy: + /@typescript-eslint/utils/5.42.1_e3uo4sehh4zr4i6m57mkkxxv7y: resolution: {integrity: sha512-Gxvf12xSp3iYZd/fLqiQRD4uKZjDNR01bQ+j8zvhPjpsZ4HmvEFL/tC4amGNyxN9Rq+iqvpHLhlqx6KTxz9ZyQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -906,7 +906,7 @@ packages: '@types/semver': 7.3.12 '@typescript-eslint/scope-manager': 5.42.1 '@typescript-eslint/types': 5.42.1 - '@typescript-eslint/typescript-estree': 5.42.1_typescript@4.8.4 + '@typescript-eslint/typescript-estree': 5.42.1_typescript@4.9.3 eslint: 8.27.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0_eslint@8.27.0 @@ -3517,14 +3517,14 @@ packages: resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} dev: true - /tsutils/3.21.0_typescript@4.8.4: + /tsutils/3.21.0_typescript@4.9.3: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 4.8.4 + typescript: 4.9.3 dev: true /type-check/0.3.2: @@ -3556,8 +3556,8 @@ packages: engines: {node: '>=10'} dev: true - /typescript/4.8.4: - resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} + /typescript/4.9.3: + resolution: {integrity: sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==} engines: {node: '>=4.2.0'} hasBin: true dev: true @@ -3784,7 +3784,7 @@ packages: he: 1.2.0 dev: true - /vue-tsc/1.0.9_typescript@4.8.4: + /vue-tsc/1.0.9_typescript@4.9.3: resolution: {integrity: sha512-vRmHD1K6DmBymNhoHjQy/aYKTRQNLGOu2/ESasChG9Vy113K6CdP0NlhR0bzgFJfv2eFB9Ez/9L5kIciUajBxQ==} hasBin: true peerDependencies: @@ -3792,7 +3792,7 @@ packages: dependencies: '@volar/vue-language-core': 1.0.9 '@volar/vue-typescript': 1.0.9 - typescript: 4.8.4 + typescript: 4.9.3 dev: true /vue/3.2.45: diff --git a/src/mount.ts b/src/mount.ts index afeca3239..8a607aa47 100644 --- a/src/mount.ts +++ b/src/mount.ts @@ -203,7 +203,7 @@ export function mount< > > // component declared by vue-tsc ScriptSetup -export function mount>( +export function mount>( component: T, options?: ComponentMountingOptions ): VueWrapper>