Skip to content

vue-doctor/correctness/require-defineprops-types ​

Declare props with a type argument: defineProps<{ title: string }>()

PropertyValue
CategoryCorrectness
Default Severitywarning
Confidencemedium
FixableNo
Engineoxlint
Sincev1.0.0
Frameworksvue, nuxt
Test filesNot checked (which files)

Why it matters ​

Declare props with a type argument: defineProps<{ title: string }>()

How to fix ​

Review the finding and update the code according to best practices below.

Agent Guidance ​

Declare props with a type argument, for example defineProps<{ title: string; count?: number }>(), instead of an untyped call or a string array.


Rule source: vue-doctor/correctness/require-defineprops-types

Released under the MIT License.