As we discussed in
https://github.com/denoland/std/pull/5605#discussion_r1701028684, it seems like
we never get `undefined` as a parse result of fields. If there is a mismatch in
the number of fields across rows, the parse just throws an error. To better
reflect this in typing, this commit removes `undefined` from the record value
type.
This commit adds more examples to `parse` function and `CsvParseStream` class to
cover all the provided options.
Also fixes a few other things:
- Replace stale description `ParseError` with the correct `SyntaxError`.
- Fix the default value of `comment` property. The old comment says the default
value is `#`, but this was wrong.
- Get negative value in `fieldsPerRecord` option working in `parse` as
documented
---------
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
The typos were found with the typos[1] spell checker. That spell
checker will be incorporated into the CI in a followup PR.
[1]: https://github.com/crate-ci/typos