File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 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"`.
2121<script setup lang="ts">
2222/* ✓ GOOD */
2323const props = defineProps<{
24- kind: string
24+ kind: string,
25+ options: { title: string }
2526}>()
2627
2728/* ✗ BAD */
2829const props = defineProps({
29- kind: { type: String }
30+ kind: { type: String },
31+ options: { type: Object as PropType<{ title: string }> }
3032})
3133</script>
3234```
@@ -50,12 +52,14 @@ const props = defineProps({
5052<script setup lang="ts">
5153/* ✓ GOOD */
5254const props = defineProps({
53- kind: { type: String }
55+ kind: { type: String },
56+ options: { type: Object as PropType<{ title: string }> }
5457})
5558
5659/* ✗ BAD */
5760const props = defineProps<{
58- kind: string
61+ kind: string,
62+ options: { title: string }
5963}>()
6064</script>
6165```
You can’t perform that action at this time.
0 commit comments