eslint-plugin-vue
eslint-plugin-vue copied to clipboard
Typed defineExpose with generic value
Please describe what the rule should do: defineExpose in script should include generic for types.
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:
defineExpose({ doSmth }); // Error
defineExpose<{ doSmth: () => void; }>({ doSmth }); // OK
Additional context This rule will help to find out potential errors on component refactoring.