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(types): Export TypeScript types #8

Merged
merged 1 commit into from
Jul 17, 2019
Merged

fix(types): Export TypeScript types #8

merged 1 commit into from
Jul 17, 2019

Conversation

benmvp
Copy link
Owner

@benmvp benmvp commented Jul 17, 2019

When formatUrl (and probably other utilities) are wrapped in functions, those functions will likely take arguments that will be passed through to the utilities. This means that those arguments will need to be typed correctly. Typing as Object will not work, it needs to be UrlParams specifically.

So this PR just exports UrlParams, UrlValue & NullableUrlParams so that they can be used as necessary. I added an integration test for this as well. The test failed with Object and passes with the newly exported UrlParams.

When `formatUrl` (and probably other utilities) are wrapped in functions, those functions will likely take arguments that will be passed through to the utilities. This means that those arguments will need to be typed correctly. Typing as `Object` will not work, it needs to be `UrlParams` specifically.

So this PR just exports `UrlParams`, `UrlValue` & `NullableUrlParams` so that they can be used as necessary. I added an integration test for this as well. The test failed with `Object` and passes with the newly exported `UrlParams`.
@benmvp benmvp merged commit a85287a into master Jul 17, 2019
@benmvp benmvp deleted the export-types branch July 17, 2019 05:51
@benmvp
Copy link
Owner Author

benmvp commented Jul 17, 2019

🎉 This PR is included in version 3.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

1 participant