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

Better typesafety for getRoutes function #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

max-programming
Copy link

@max-programming max-programming commented Nov 16, 2024

This PR uses the types from the backend libraries and makes the getRoutes function more typesafe

Let me know if any further changes are required

@max-programming max-programming changed the title Better typesafety Better typesafety for getRoutes function Nov 16, 2024
@VladimirMikulic
Copy link
Owner

Hi @max-programming! Thank you so much for this PR and apologies for late response here.
You're importing types from all packages that user may not have - would that cause issues for them?

@max-programming
Copy link
Author

@VladimirMikulic I don't think that will be a problem. Because the packages are installed here in the route-list library.

Secondly we're only importing types just for better type checking when the users use the library

@VladimirMikulic
Copy link
Owner

@max-programming they are installed but as dev dependencies?

@max-programming
Copy link
Author

I think because we only use the types, we don't really need them in dependencies
As the code is not going to run on the runtime, it's just the types

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