Skip to content
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

fix inaccurate return type #9935

Merged
merged 1 commit into from
Oct 9, 2024
Merged

fix inaccurate return type #9935

merged 1 commit into from
Oct 9, 2024

Conversation

gigabites19
Copy link
Contributor

Example given in the docs works but produces a type error when used with typescript because setup function given to createInertiaApp has the following signature:
(props:{ el: Element; App: InertiaApp; props: InertiaAppProps; plugin: Plugin; }) => void | App<any>

While the example (because it ends with .mount(el)) returns ComponentPublicInstance.

Changes I made work and do not produce type errors.

Example from inertia docs doesn't return created instance either so I don't think it's necessary.

@taylorotwell taylorotwell merged commit f6715ca into laravel:11.x Oct 9, 2024
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

Successfully merging this pull request may close these issues.

2 participants