[Typescript] ERROR Failed to compile - No overload matches this call
See original GitHub issueTell about your platform
- Vue.js version : 2.x with typescript
- Browser name and version : Chrome|Firefox|Edge x.x.x
- This package version : 3.x.x
Hi how are you everybody? i have somekind of issue when run the command vue-cli-service build --mode production with this lib, the thing is the next:
vue-cli-service build --mode production
- Building for production...
Starting type checking service...
Using 1 worker with 2048MB memory limit
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
ERROR Failed to compile with 1 error2:16:10 PM
error in /srv/src/atomics/loaders/Spinner.vue
ERROR in /srv/src/atomics/loaders/Spinner.vue(17,2):
17:2 No overload matches this call.
Overload 1 of 2, '(options: ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<...>> & ThisType<...>): <VC extends VueClass<...>>(target: VC) => VC', gave the following error.
Type 'typeof LoadingPlugin' is not assignable to type 'VueConstructor<Vue> | AsyncComponentPromise<any, any, any, any> | AsyncComponentFactory<any, any, any, any> | FunctionalComponentOptions<...> | ComponentOptions<...>'.
Type 'typeof LoadingPlugin' is missing the following properties from type 'VueConstructor<Vue>': extend, nextTick, set, delete, and 10 more.
Overload 2 of 2, '(target: VueClass<Vue>): VueClass<Vue>', gave the following error.
Argument of type '{ components: { Loading: typeof Loading; }; }' is not assignable to parameter of type 'VueClass<Vue>'.
Object literal may only specify known properties, but 'components' does not exist in type 'VueClass<Vue>'. Did you mean to write 'component'?
15 | import Loading from 'vue-loading-overlay';
16 |
> 17 | @Component({
| ^
18 | components: {
19 | Loading,
20 | },
i am using the guide as component, what can i do in this situation? regards
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (6 by maintainers)
Top Results From Across the Web
No overload matches this call. Type 'string' is not assignable to ...
Solution 1: Keep numeric enum signals · Solution 2: Use pure signal string literal types · Solution 3: Change to string enum (no...
Read more >No overload matches this call error in TypeScript | bobbyhadz
The error "No overload matches this call" occurs when we call a function and pass it a parameter that doesn't match any of...
Read more >Typescript error: No overload matches this call. #2482 - GitHub
I just init a expo typescript project. Then add 'react-native-paper' in my project. When try to use Button component it gives me this ......
Read more >No overload matches this call with styled components - Medium
No overload matches this call in TypeScript is really annoying and there aren't too many solutions around there, though we have a solution!...
Read more >Typescript error is driving me crazy! - MongoDB
I get the following error from TS which I am unable to solve :frowning: No overload matches this call. Overload 2 of 4,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue is that the types inside
loading.d.ts
are not correct.According to the d.ts file the default export is only a Vue plugin and not a vue component. But the
index.js
exports a combined plugin/component:If you want to use
vue-loading-component
as a component you can just cast it toComponent
as a workaround:@ankurk91 i did the minimal reproduction with a fresh vue project in ts. it’s more easy if you could clone it. on this way when you run the command you can see the error directly on the console
https://github.com/erikhu/minimal-reproduction-vue-loading