Skip to content

[inertia-vue] The useForm helper returns any type #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
valh1996 opened this issue Jun 30, 2024 · 2 comments
Closed

[inertia-vue] The useForm helper returns any type #79

valh1996 opened this issue Jun 30, 2024 · 2 comments

Comments

@valh1996
Copy link

valh1996 commented Jun 30, 2024

Laravel Precognition Plugin Version

0.5.5

Laravel Version

0.5.5

Plugin

Vue w/ Inertia

Description

The useForm helper returns any type, which is annoying because I have no idea what methods are available.
Is this intentional?

In addition, if I use the transform() method, data isn't typed and so the properties of my form aren't found.

Steps To Reproduce

Simply import useForm from the Inertia plugin and you'll see that it is not typed:

import { useForm } from 'laravel-precognition-vue-inertia';

I see that laravel-precognition-vue does have a return type, unlike laravel-precognition-view-inertia: https://github.com/laravel/precognition/blob/main/packages/vue-inertia/src/index.ts#L8

@crynobone
Copy link
Member

Hi there, if you could whip up a PR for us to look at, that'd be great! Thanks.

Duplicate of #63 and previous fail attempt: #64

@valh1996
Copy link
Author

valh1996 commented Jul 1, 2024

Hi @crynobone, I've just looked at the PR list, it seems to be more linked to #77.
I'll wait for @timacdonald review then, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants