Environment
Vuetify Version: 4.0.1
Vue Version: 3.5.29
OS: macOS 10.15.7 (current)
Steps to reproduce
- View the TypeScript error generated by line 13 of App.vue
Expected Behavior
No TypeScript errors
Actual Behavior
This typescript error:
Expected 1-2 arguments, but got 0. ts-plugin(2554)
rules.d.ts(5, 52): An argument for 'err' was not provided.
Reproduction Link
https://codesandbox.io/p/devbox/j6xncq
Other comments
Apologies for providing a codesandbox link instead of a Vuetify Playground link, but I couldn't see how to add the Rules plugin in the Playground. The codesandbox example is essentially straight out of the Validation rules doc page (https://vuetifyjs.com/en/features/rules).
I'm having trouble reproducing it in the codesandbox, but in my actual project I also see this TypeScript error from the same use of a custom rule in a template:
error TS2722: Cannot invoke an object which is possibly 'undefined'.
72 :rules="[rules.pinCode()]"
~~~~~~~~~~~~~
Environment
Vuetify Version: 4.0.1
Vue Version: 3.5.29
OS: macOS 10.15.7 (current)
Steps to reproduce
Expected Behavior
No TypeScript errors
Actual Behavior
This typescript error:
Reproduction Link
https://codesandbox.io/p/devbox/j6xncq
Other comments
Apologies for providing a codesandbox link instead of a Vuetify Playground link, but I couldn't see how to add the Rules plugin in the Playground. The codesandbox example is essentially straight out of the Validation rules doc page (https://vuetifyjs.com/en/features/rules).
I'm having trouble reproducing it in the codesandbox, but in my actual project I also see this TypeScript error from the same use of a custom rule in a template: