vue/define-emits-declaration
enforce declaration style of
defineEmits
📖 Rule Details
This rule enforces defineEmits
typing style which you should use type-based
, strict type-literal
(introduced in Vue 3.3), or runtime
declaration.
This rule only works in setup script and lang="ts"
.
🔧 Options
json
"vue/define-emits-declaration": ["error", "type-based" | "type-literal" | "runtime"]
type-based
(default) enforces type based declarationtype-literal
enforces strict "type literal" type based declarationruntime
enforces runtime declaration
runtime
type-literal
👫 Related Rules
📚 Further Reading
🚀 Version
This rule was introduced in eslint-plugin-vue v9.5.0