Skip to content

Conversation

johnsoncodehk
Copy link
Member

@johnsoncodehk johnsoncodehk commented Mar 24, 2023

Follow-up to #1964

  • No needed generic="T extends any" and more, just generic="T"
  • Deprecated experimentalRfc436 flag, judging only based on whether there is a generic attr
  • Workaround for JSX issues in template #592 when enabled jsxTemplates: /** @jsxImportSource vue */

Requirement

  • Volar / vue-tsc: >= 1.3.7
  • Vue: >= 3.3.0-alpha.5

Changes

  • tsconfg.json
{
-   "vueCompilerOptions": {
-     "jsxTemplates": true,
-     "experimentalRfc436": true
-   }
}
  • Component
- <script setup lang="ts" generic="T extends any">
+ <script setup lang="ts" generic="T">
defineProps<{ msg: T }>()
</script>

If in doubt about codegen behavior, you can inspect the virtual code with the Volar (Debug): Show Virtual Files command.

@johnsoncodehk johnsoncodehk changed the title feat: deprecated experimentalRfc436 flag feat: RFC 436 Leaves Experimental Mar 24, 2023
@johnsoncodehk johnsoncodehk marked this pull request as ready for review March 25, 2023 00:08
@johnsoncodehk johnsoncodehk merged commit 836043a into master Mar 25, 2023
@johnsoncodehk johnsoncodehk deleted the rfc436 branch March 25, 2023 00:17
@yyx990803 yyx990803 mentioned this pull request Mar 26, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant