You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll use this issue to report multiple issues I have found while working with the plugin
Lack of typing for vModel
{/* vModel property is not known - but works */}<LogMessagesvModel={toLog.value}// v-model={toLog.value} - works, untyped due to it being looked up on intrinsic attributes and it having a fallthrough case/>{/* Works and is typed */}<LogMessagesonUpdate:modelValue={(e)=>(toLog.value=e)}modelValue={toLog.value}/>
resolveTypes does not generate typed emits
{/* Event type is not resolved */}<LogInputonLog={(msg)=>log(msg)}/>constLogInput=defineComponent((_,{ emit }: SetupContext<{log: (msg: string)=>void}>// : { emit: { log: (msg: string) => void } } - no difference in typing)=>{constinput=ref('')constlog=(msg: string)=>emit('log',msg);return()=>(<div><inputvModel={input.value}onKeydown={(e)=>{if(e.key!=='Enter')return;log(input.value);input.value='';}}/></div>);}// #Works with such declaration:// {// emits: {// log: (msg: string) => true// }// }// #Does not work with runtime and resolveTypes)
After diving deeper into this issue it appears to be a connection of problems between two repositories Language Tools And this one
There would be need to add a resolver for defineComponent for types including the resolveTypes and vModel
Should this issue be moved to Language Tools repository?
🐛 Bug description
I'll use this issue to report multiple issues I have found while working with the plugin
vModel
resolveTypes
does not generate typed emitsused jsx-explorer to check code
📝 Steps to reproduce
Create a new tsx repository using create-vue
Reproduction Link: Reproduction
🏞 Desired result
🚑 Other information
The text was updated successfully, but these errors were encountered: