-
Notifications
You must be signed in to change notification settings - Fork 38
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
[0.5.x] Type vue-inertia
#88
Conversation
49eeb3d
to
156e031
Compare
packages/vue-inertia/src/index.ts
Outdated
import { watchEffect } from 'vue' | ||
|
||
export { client } | ||
|
||
export const useForm = <Data extends Record<string, unknown>>(method: RequestMethod|(() => RequestMethod), url: string|(() => string), inputs: Data, config: ValidationConfig = {}): any => { | ||
type Precognitive<Data extends object> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not 100% sold on this name for the type, but it is private.
I did consider joining with a laravel-precognition
type but this is probably more resilient since it's not a true union of attributes.
This is likely technically a duplicate of #77 Didn't notice that before I started working. |
Just curious, why mark as Draft @taylorotwell? I vaguely assume y'all have some big changes to be merged around LaraconUS and so this maybe won't be relevant after said change? |
@ncphillips, Taylor has marked it as draft so I can review the PR. I am currently working on the async validate PR and once that is merged I will be coming through and tidying up / reviewing the draft TypeScript PRs. |
Okay sweet! I thought I saw the contributing docs say drafts wouldn't be reviewed so that's good to know. Thanks a lot 🙏 |
156e031
to
a9104f8
Compare
@ncphillips, would you mind taking a quick look at my changes and let me know any concerns or thoughts? If you are happy, I'll open the PR for Taylor to review. |
laravel-precognition-vue-inertia
@timacdonald besides that little suggestion I think this looks good! |
Co-authored-by: Nolan <[email protected]>
Thank you, @ncphillips |
laravel-precognition-vue-inertia
...vue-inertia
The
useForm
composable for Inertia has no types.This PR adds them.