Skip to content

Dynamic return types using generics #45

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

Merged
merged 7 commits into from
May 21, 2025

Conversation

elchukc
Copy link
Contributor

@elchukc elchukc commented May 21, 2025

Only changes type declaration file. Code functionality unchanged. All changes tested while using the library in a project.
Changes can be viewed commit-by-commit to see how the final types were built up to. This is on top of #44.

  1. Geocoding queries can be strings or address component objects
  2. Infer return type is array if input is array, or record if input is record
  3. If we know the keys of a record, recognize key types as those keys specifically
  4. optional _warnings property on response objects

@MiniCodeMonkey MiniCodeMonkey merged commit b85a399 into Geocodio:master May 21, 2025
0 of 4 checks passed
@MiniCodeMonkey
Copy link
Member

Thanks for contributing with these improvements!

@elchukc elchukc deleted the type-enhancements branch May 21, 2025 10:51
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