Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

Typescript errors #34

Closed
Deniz073 opened this issue Feb 28, 2023 · 9 comments · Fixed by #35
Closed

Typescript errors #34

Deniz073 opened this issue Feb 28, 2023 · 9 comments · Fixed by #35

Comments

@Deniz073
Copy link

  • Breeze Version: 1.19.2
  • Laravel Version: latest
  • PHP Version: 8.1.2
  • Database Driver & Version:

Description:

The newest version of Breeze made some changes to the props of components resulting in typescript giving errors. Could you maybe update this package to solve those? I would have loved to do it myself but i have insufficient knowledge of typescript sadly.

Steps To Reproduce:

Fresh install of laravel with this package.

@drewmw5
Copy link
Owner

drewmw5 commented Mar 1, 2023

Thanks for bringing this to my attention. Do you know specifically which components are broken? I've got a little bit of time today and maybe tomorrow to take a look at it.

Thanks.

@Deniz073
Copy link
Author

Deniz073 commented Mar 2, 2023

It were quite a few, i just looked at the warnings/problems vscode gave me because of incorrect types. Also Inertia/Inertia was renamed to Inertia/core so the usePage hook isnt typed correctly anymore.

@drewmw5 drewmw5 linked a pull request Mar 3, 2023 that will close this issue
@drewmw5
Copy link
Owner

drewmw5 commented Mar 3, 2023

Thanks! I fixed the ones I could find. I'm honestly not too sure how to fix the usePage hook type right now, but I'll try to get it typed correctly before the end of the weekend.

@drewmw5
Copy link
Owner

drewmw5 commented Mar 3, 2023

Please consider leaving this repo a star! Thank you!

@Deniz073
Copy link
Author

Deniz073 commented Mar 5, 2023

@drewmw5 hey is the latests version with these fixes published to composer? latests version on packagist is 1.5, but the latest version on this repo is 1.5.2

@Deniz073
Copy link
Author

Deniz073 commented Mar 5, 2023

Thanks! I fixed the ones I could find. I'm honestly not too sure how to fix the usePage hook type right now, but I'll try to get it typed correctly before the end of the weekend.

i think usePage<InertiaPage & { [key: string]: any }> solves the typing of usePage.

@drewmw5
Copy link
Owner

drewmw5 commented Mar 5, 2023

@drewmw5 hey is the latests version with these fixes published to composer? latests version on packagist is 1.5, but the latest version on this repo is 1.5.2

Good catch! Packagist retrieves the version from the GitHub releases/tags. I misnamed the tag as "v.1.5.2", but it should be "v1.5.2". This is causing the issue. I'm not home right now, but once I am I'll fix the tag names.

@drewmw5
Copy link
Owner

drewmw5 commented Mar 5, 2023

Thanks! I fixed the ones I could find. I'm honestly not too sure how to fix the usePage hook type right now, but I'll try to get it typed correctly before the end of the weekend.

i think usePage<InertiaPage & { [key: string]: any }> solves the typing of usePage.

Awesome! I'll give it a test once I get home, but if you'd like to open a PR so you're listed as a contributor, please do so! I'll try to get around to working on things tonight.

@Deniz073
Copy link
Author

Deniz073 commented Mar 5, 2023

Thanks! I fixed the ones I could find. I'm honestly not too sure how to fix the usePage hook type right now, but I'll try to get it typed correctly before the end of the weekend.

i think usePage<InertiaPage & { [key: string]: any }> solves the typing of usePage.

Awesome! I'll give it a test once I get home, but if you'd like to open a PR so you're listed as a contributor, please do so! I'll try to get around to working on things tonight.

Just opened a PR for it!

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

Successfully merging a pull request may close this issue.

2 participants