vue-component-type-helpers 1.3.14-patch.1 → 1.3.14-patch.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +26 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # vue-component-type-helpers
2
+
3
+ Some very simple type helpers used behind `vue-component-meta` for extract component props, slots, emit, exposed types.
4
+
5
+ ## Usage
6
+
7
+ ```vue
8
+ <template>
9
+ <slot name="header" :num="123" />
10
+ <slot name="footer" str="abc" />
11
+ </template>
12
+
13
+ <script lang="ts" setup>
14
+ defineProps<{
15
+ msg: string
16
+ }>()
17
+ </script>
18
+ ```
19
+
20
+ ```ts
21
+ import HelloWorld from './HelloWorld.vue'
22
+ import { ComponentProps, ComponentSlots } from 'vue-component-type-helpers'
23
+
24
+ type Props = ComponentProps<typeof HelloWorld> // { msg: string }
25
+ type Slots = ComponentSlots<typeof HelloWorld> // { header(_: { num: number; }): any; footer(_: { str: string; }): any; }
26
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-component-type-helpers",
3
- "version": "1.3.14-patch.1",
3
+ "version": "1.3.14-patch.2",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "*.d.ts"