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

refactor: use type over interface for TS type definitions #47

Closed

Conversation

matthiasweiss
Copy link
Contributor

@matthiasweiss matthiasweiss commented Feb 25, 2025

Hello everybody!

This PR changes all type definitions from interface to type.

Using types over interfaces is very commen in the TS community, see e.g. https://www.totaltypescript.com/type-vs-interface-which-should-you-use#default-to-type-not-interface.

It would also allow for adding typechecking to the CI/CD workflows (without the need of adapting the exported types in Inertia itself). Some of the interfaces currently do not pass type checks and have been swapped by me in #31 or @christophstockinger in #37.

I'd definitely prefer types over interfaces, although that might also be a bit of personal preference. Let me know what you think! 😁

@matthiasweiss matthiasweiss changed the title refactor: replace interface with type refactor: use type over interface for TS type definitions Feb 25, 2025
@taylorotwell
Copy link
Member

#37

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