Subscribe on changes!

[Typescript] tsc occur error in runtime-core.d.ts

avatar
Jan 30th 2021

Version

3.0.5

Reproduction link

https://codepen.io/l1shu/pen/ExgwjbM

Steps to reproduce

when I run tsc, it will show an error like:

node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1342:115 - error TS2574: A rest element type must be an array type.

export declare function watch<T extends MultiWatchSources, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
                                                                                                                       ~~~~


Found 1 error.

error Command failed with exit code 1.

my tsconfig.json file in the codepen link

What is expected?

tslint success

What is actually happening?

tslint success


I want to know if it is a bug? if not, how can I fix it. thx

avatar
Jan 30th 2021

Which version of Typescript are you using? You should use Typescript 4.0+

avatar
Jan 31st 2021

Closing as this is not a valid repro. Please read https://new-issue.vuejs.org/?repo=vuejs/vue#why-repro


Please, next time consider using the forum, the Discord server or StackOverflow for questions first. But feel free to come back and open an issue if it turns out to be a bug 🙂