vue-component-type-helpers
Some very simple type helpers used behind vue-component-meta
for extract component props, slots, emit, exposed types.
Usage
<template>
<slot name="header" :num="123" />
<slot name="footer" str="abc" />
</template>
<script lang="ts" setup>
defineProps<{
msg: string
}>()
</script>
import HelloWorld from './HelloWorld.vue'
import type { ComponentProps, ComponentSlots } from 'vue-component-type-helpers'
type Props = ComponentProps<typeof HelloWorld>
type Slots = ComponentSlots<typeof HelloWorld>
2.0.6 (2024/3/7)
[!IMPORTANT]
If the TypeScript language server crashes since 2.0, please try using VSCode Insiders and install JavaScript and TypeScript Nightly, or temporarily downgrade to 1.8.27.
Issue: https://github.com/vuejs/language-tools/issues/3962
If false positive errors occur, please try disabling unrelated extensions in the Vue workspace.
Issue: https://github.com/vuejs/language-tools/issues/3942
Fixes
- language-core: use local variables in v-bind shorthand (#4017) - thanks @so1ve
- language-core: sfc folding end position failed to mapping (#4038) - thanks @so1ve
- language-service: remove
extraLiners
option for formatting (#3943) - language-service: bump
volar-service-typescript
for fix jsx formatting (#3949) - language-service: bump
@volar/typescript
for fix 2.0.5 auto-complete performance regression (#4024)
Other Changes
- vscode: rename
vue.inlayHints.vbindShorthand
setting to vue.inlayHints.vBindShorthand
(#3995) - thanks @l4dybird