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

Improve typing #95

Merged
merged 8 commits into from
Mar 12, 2024
Merged

Improve typing #95

merged 8 commits into from
Mar 12, 2024

Conversation

alexcaza
Copy link
Owner

Instead of using any and unknown with formatData, I wanted stricter type safety within the library code.

formatData will also now throw UnsupportedDataFormatError if it gets something other than a primitive data type (which can be seen under AcceptedData in types.ts. It should be up to the caller of the library to make sure their data is transformed correctly before generating a CSV with it.

@alexcaza alexcaza merged commit 670a496 into main Mar 12, 2024
3 checks passed
@alexcaza alexcaza deleted the improve-typing branch March 12, 2024 00:26
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.

1 participant