feat(csv-parse): add generic type argument#457
Merged
wdavidw merged 1 commit intoadaltas:masterfrom May 19, 2025
Merged
Conversation
09062b2 to
2024c2d
Compare
tusbar
commented
May 10, 2025
packages/csv-parse/test/api.types.ts
Outdated
|
|
||
| }) | ||
|
|
||
| describe('sync api', () => { |
Contributor
Author
There was a problem hiding this comment.
This was duplicated from test/api.types.sync.ts
a4089f9 to
dd8196d
Compare
Member
|
Would you mind if I first fix the duplication of the api.type.sync test and also apply some eslint formatting to the ts tests. You will have to rebase on master and maybe fix some merging conflicts due to the formatting. |
Contributor
Author
|
Sure. |
Member
|
Thank you for your patience. The eslint related refactor is committed and pushed. |
This is based on the columns option. When falsy, the records are string[][]. When defined, the records are T[], T defaulting to unknown. Restrict columns to keyof T. Update onRecord / on_record to take and return type T. Fix adaltas#278 Fix adaltas#407
dd8196d to
d3c402a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is based on the
columnsoption.When falsy, the records are
string[][].When defined, the records are
T[],Tdefaulting tounknown.Restrict
columnstokeyof T.Update
onRecord/on_recordto take and return typeT.Fix #278
Fix #407