File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -21,12 +21,14 @@ This rule only works in setup script and `lang="ts"`.
21
21
<script setup lang="ts">
22
22
/* ✓ GOOD */
23
23
const props = defineProps<{
24
- kind: string
24
+ kind: string,
25
+ options: { title: string }
25
26
}>()
26
27
27
28
/* ✗ BAD */
28
29
const props = defineProps({
29
- kind: { type: String }
30
+ kind: { type: String },
31
+ options: { type: Object as PropType<{ title: string }> }
30
32
})
31
33
</script>
32
34
```
@@ -50,12 +52,14 @@ const props = defineProps({
50
52
<script setup lang="ts">
51
53
/* ✓ GOOD */
52
54
const props = defineProps({
53
- kind: { type: String }
55
+ kind: { type: String },
56
+ options: { type: Object as PropType<{ title: string }> }
54
57
})
55
58
56
59
/* ✗ BAD */
57
60
const props = defineProps<{
58
- kind: string
61
+ kind: string,
62
+ options: { title: string }
59
63
}>()
60
64
</script>
61
65
```
You can’t perform that action at this time.
0 commit comments