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.

Named v-slots fail

See original GitHub issue

Hi, this is my first issue. Please do let me know if anything is missing.

Error:

error TS7053: Element implicitly has an 'any' type because expression of type '"default-view-body"' can't be used to index type '{} | {}'.

  • Whenever using v-slot or # shorthand on component template tag.

https://github.com/srav001/vue-ionic-template

Issue can be found in this repo. In the file Home.vue a named slot is being used from BaseView.vue. npm run dev works, but building it fails with above mentioned error.

I found a similar issue in the older repo but it was never followed up by the issuer - https://github.com/johnsoncodehk/vue-tsc/issues/82.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
rfox12commented, Sep 3, 2022

This is a Volar issue and should not be closed…

1reaction
sixpoundercommented, Aug 19, 2022

@sixpounder your solution worked for me as well. Thank you! This seems so unrelated, any idea on why it’s a problem?

I honestly have no idea because I didn’t nosedive into volar code to further investigate this issue, but I can make an educated guess given the errors: maybe volar doesnt correctly type templates collections and sees them as a {} type, when something like Record<string, unknown> or better should be used? I repeat, just a guess.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Errors on vslot - vue.js - Stack Overflow
I have this code in my Vue2 app. It's from a vuetify data table and is to insert the chapter name ...
Read more >
CSCuw64547 - MK41: Failed to add alias name ... - Cisco Bug
Symptom: %FEX module is not associated with proper VSLOT. Failed to add alias name Conditions: While loading transformer/termiantor with fex ...
Read more >
[Solved]-Vue - Bug or design with template vslots-Vue.js
First call: completely ignored, no error --> <template v-for="item in notDefinedOnTheInstance" v-slot:[`sameSlot`]="{sameBlah}"> {{ JSON.stringify(item) }} ...
Read more >
Models supported by emmeans
The bhat and V slots are obtained via averaging and, in the case of multiple imputation, adding a multiple of the between-imputation covariance...
Read more >
Using Vue.js slots to pass HTML content to components
How do you use V-slots ? When Vue version 2.6 was released, it shipped with a better syntax to reference slot names from...
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