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
Soooo this is a pretty obscure issue I found. I have a project that's using TypeScript, and I want to turn on the noImplicitAny option. When I do so, compilation fails on any single file components that don't have a script setup block with lang set to "ts" and some form of content (even if just comments). This seems to be because the parameters to the generated render function lack types. I'm guessing the lang part of things is what notifies vue to generate the types, and empty tags are pruned before the lang attribute is seen. Is there some way to notify the plugin that all loaded script tags will be typescript? Or do I need to add the redundant script tag to every component that doesn't have behavior?
Here's an example of what I'm talking about
<scriptsetuplang="ts">//this is required if we're to have noImplicitAny: true//both the lang being set to ts and these comments are needed//for the emitted code to have types associated with parameters</script><template><h1class="text-primary fw-bold text-center border-bottom border-primary pt-3 pb-3"><slot></slot></h1><divclass="pb-3"></div></template>
The text was updated successfully, but these errors were encountered:
Soooo this is a pretty obscure issue I found. I have a project that's using TypeScript, and I want to turn on the noImplicitAny option. When I do so, compilation fails on any single file components that don't have a script setup block with lang set to "ts" and some form of content (even if just comments). This seems to be because the parameters to the generated render function lack types. I'm guessing the lang part of things is what notifies vue to generate the types, and empty tags are pruned before the lang attribute is seen. Is there some way to notify the plugin that all loaded script tags will be typescript? Or do I need to add the redundant script tag to every component that doesn't have behavior?
Here's an example of what I'm talking about
The text was updated successfully, but these errors were encountered: