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

feat: Overloaded types for serialize() #341

Merged
merged 5 commits into from
Jan 22, 2024

Conversation

ibgreen
Copy link
Contributor

@ibgreen ibgreen commented Jan 20, 2024

Lost some time

  • before I realized that only the string variant of deserialize() accepts a filter rectangle.
  • Figuring out what type of data was returned based on input types.

Typescript overloading allows us to ensure return value types match input types, and looks like typedocs also generates separate entry for each overload.

https://www.tutorialsteacher.com/typescript/function-overloading

Only supporting rect for http range requests seems like an unnecessary restriction, why not implement the filtering for all variants (even if we parse the library could avoiding calling callbacks for features outside an area of interest)

@bjornharrtell
Copy link
Member

Seems sensible. I agree that rect filtering would make sense to be supported by all sources but I haven't had the need myself yet.

@ibgreen
Copy link
Contributor Author

ibgreen commented Jan 21, 2024

@bjornharrtell Fixed the prettier issue, but looks like you need to approve the CI runs after each update, not just once for the PR?

@bjornharrtell
Copy link
Member

@ibgreen thanks for the contribution!

@bjornharrtell bjornharrtell merged commit 4b38099 into flatgeobuf:master Jan 22, 2024
11 checks passed
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.

None yet

2 participants