Skip to content

Commit b59f696

Browse files
committed
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<Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{ title: string; }>>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>; ... 10 more ...; $watch<T extends string | ((...args: any) => any...' is not assignable to parameter of type 'ComponentOptionsWithObjectProps<__VLS_TypePropsToRuntimeProps<{ title: string; }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 5 more ..., {}>'. Type 'ComponentPublicInstanceConstructor<{ $: ComponentInternalInstance; $data: {}; $props: Partial<{}> & Omit<Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{ title: string; }>>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>; ... 10 more ...; $watch<T extends string | ((...args: any) => any...' is not assignable to type 'ComponentOptionsBase<Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{ title: string; }>>> & { [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined; }, ... 10 more ..., string>'. Types of property 'setup' are incompatible. Type '((this: void, props: Readonly<LooseRequired<Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{ title: string; }>>>>>, ctx: SetupContext<...>) => void | ... 2 more ... | Promise<...>) | undefined' is not assignable to type '((this: void, props: Readonly<LooseRequired<Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{ title: string; }>>> & { [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined; }>>, ctx: SetupContext<...>) => void | ... 2 more ... | Promise<...>) | undefined'. Type '(this: void, props: Readonly<LooseRequired<Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{ title: string; }>>>>>, ctx: SetupContext<...>) => void | ... 2 more ... | Promise<...>' is not assignable to type '(this: void, props: Readonly<LooseRequired<Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{ title: string; }>>> & { [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined; }>>, ctx: SetupContext<...>) => void | ... 2 more ... | Promise<...>'. Types of parameters 'ctx' and 'ctx' are incompatible. Type 'SetupContext<string[]>' is not assignable to type 'SetupContext<{}>'. 6 const wrapper = mount(ScriptSetup_ToRefsInject, { ```
1 parent 5523220 commit b59f696

File tree

3 files changed

+35
-35
lines changed

3 files changed

+35
-35
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"reflect-metadata": "0.1.13",
5252
"rollup": "3.2.5",
5353
"tslib": "2.4.1",
54-
"typescript": "4.8.4",
54+
"typescript": "4.9.3",
5555
"unplugin-vue-components": "0.22.9",
5656
"vite": "3.2.3",
5757
"vitepress": "0.22.4",

pnpm-lock.yaml

Lines changed: 33 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/mount.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export function mount<
203203
>
204204
>
205205
// component declared by vue-tsc ScriptSetup
206-
export function mount<T extends DefineComponent<any, any, any, any>>(
206+
export function mount<T extends DefineComponent<any, any, any, any, any>>(
207207
component: T,
208208
options?: ComponentMountingOptions<T>
209209
): VueWrapper<InstanceType<T>>

0 commit comments

Comments
 (0)