question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Template interpolation error - argument type is not assignable.

See original GitHub issue
  • [√] I have searched through existing issues
  • [√] I have read through docs
  • [√] I have read FAQ

Info

  • Platform: macOS
  • Vetur version: 0.21.0
  • VS Code version: 1.34

Problem

I don’t get any errors in Vue Language Server output.

Reproducible Case

Once I add "vetur.validation.template": true, and "vetur.experimental.templateInterpolationService": true, to my settings.json of VSCode I get an error in each .vue file I open. These files are SFC of vue. I’m using partially TypeScript and partialy JS in my code. tsconfig.js seems to be configured properly with includes of files and path of ‘@/*’.

Argument of type ‘{ props: { message: { type: StringConstructor; default: string; }; id: { type: NumberConstructor; default: any; }; type: { type: StringConstructor; default: string; }; contentType: { type: StringConstructor; default: string; }; instanceType: { …; }; coach: { …; }; createdAt: { …; }; startsAt: { …; }; }; comp…’ is not assignable to parameter of type ‘new (…args: any[]) => any’.

Type ‘{ props: { message: { type: StringConstructor; default: string; }; id: { type: NumberConstructor; default: any; }; type: { type: StringConstructor; default: string; }; contentType: { type: StringConstructor; default: string; }; instanceType: { …; }; coach: { …; }; createdAt: { …; }; startsAt: { …; }; }; comp…’ provides no match for the signature ‘new (…args: any[]): any’. Vetur(2345)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
alukoscommented, Sep 27, 2019

my workaround was to add:

<script>
import Vue from 'vue'
export default Vue.extend({
...
})
</script>
0reactions
yoyo930021commented, Oct 5, 2021

The reason for this problem is very broad. I will lock this issue, if you have a problem, open a new issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - Type 'CssFunctionReturnType' is not assignable to ...
gave the following error. Argument of type 'CssFunctionReturnType' is not assignable to parameter of type 'Interpolation'.
Read more >
Type 'string' is not assignable to type in TypeScript | bobbyhadz
The "Type 'string' is not assignable to type" TypeScript error occurs when we try to assign a value of type string to something...
Read more >
Handbook - Basic Types - TypeScript
Argument of type 'string' is not assignable to parameter of type 'object'. create ( false );. Argument of type 'boolean' is not assignable...
Read more >
Template literals (Template strings) - JavaScript | MDN
Template literals are literals delimited with backtick (`) characters, allowing for multi-line strings, string interpolation with embedded ...
Read more >
TypeScript - i18next documentation
Type error - template literal ... If you face this issue: Argument of type 'string' is not assignable to parameter of type ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found