How to make a slot name recognized?

I have the warning

Unrecognized slot name

in a correct piece of my code. This is a Quasar / Vue component (bit this does not matter much for the question I guess)

<template v-slot:title>
<q-input model-value='undefined' v-model='note.title' dense :class='titleClass' borderless/>

How can I help Webstorm to not raise an issue?

(this is actually GoLand, but the question being relevant to web apps, I guess that Webstorm is a better choice for the topic)


>bit this does not matter much for the question I guess


it does actually matter... The IDE checks the parent component (<q-editor> in your case) definition when validating slot names; and, when working with libraries like Quasar, we are using a special format of metadata, called web-types, for code completion/validation. web-types describe the library's components and their props, events, slots, etc. But the problem is that QEditor component doesn't have slots defined in node_modules\quasar\dist\web-types\web-types.json:

"slots": [],

I've verified that slots are correctly recognized for those Quasar components that have slots described in web-types.json


Thank you very much for the detailed answer. I will raise the point with Quasar then.


Please sign in to leave a comment.