Closed
Description
Please describe what the rule should do:
Forces the TypeScript only way of defining props.
What category should the rule belong to?
[x] Enforces code style (layout)
[ ] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
GOOD
const props = defineProps<{
/**
* The kind of button to render
*/
kind: 'primary' | 'secondary',
}>()
BAD
const props = defineProps({
/**
* The kind of button to render
*/
kind: { type: String as PropType<'primary' | 'secondary'> },
})
BAD
const props = defineProps({
/**
* The kind of button to render
*/
kind: { type: String },
})