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

docs(csv): improve API docs #4920

Merged
merged 3 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tweaks
  • Loading branch information
iuioiua committed Jun 2, 2024
commit 644962b040c4d97fc99ff739ee654b8f618c1990
12 changes: 3 additions & 9 deletions csv/_io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,16 +286,10 @@ export class ParseError extends SyntaxError {
* Constructs a new instance.
*
* @example Usage
* ```ts
* import { parse, ParseError } from "@std/csv/parse";
* ```ts no-eval
* import { ParseError } from "@std/csv/parse";
*
* try {
* parse(`a "word","b"`);
* } catch (error) {
* if (error instanceof ParseError) {
* console.error(error.message);
* }
* }
* throw new ParseError(1, 2, 3, "error message");
* ```
*
* @param start Line where the record starts
Expand Down
12 changes: 3 additions & 9 deletions csv/stringify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,10 @@ export class StringifyError extends Error {
* Construct a new instance.
*
* @example Usage
* ```ts
* import { stringify, StringifyError } from "@std/csv/stringify";
* ```ts no-eval
* import { StringifyError } from "@std/csv/stringify";
*
* try {
* stringify([{ a: 1 }, { a: 2 }], { separator: "\r\n" });
* } catch (error) {
* if (error instanceof StringifyError) {
* console.error(error.message);
* }
* }
* throw new StringifyError("An error occurred");
* ```
*
* @param message The error message.
Expand Down
Loading