precognition
precognition copied to clipboard
Extended original InertiaJS props and method types into PrecognitionFormProps
I was able to extend original InertiaJS props and methods types into the PrecognitionFormProps, so Typescript linters can provide scope over the original InertiaFormProps.
This method is better that proposed in https://github.com/laravel/precognition/pull/71 because it's not required to wrap methods for InertiaJS.
Advantages:
- It will automatically inherit automatically all methods and props from different InertiaJS versions.
- Easy to maintain, it only requires to write definitions for the resulted object of Precognition "useForm".