Skip to content

Commit

Permalink
Cause: add jsdocs and tests (#4340)
Browse files Browse the repository at this point in the history
gcanti authored Jan 25, 2025
1 parent 59b3cfb commit 502223a
Showing 4 changed files with 1,717 additions and 522 deletions.
1,011 changes: 773 additions & 238 deletions packages/effect/src/Cause.ts

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion packages/effect/src/internal/cause.ts
Original file line number Diff line number Diff line change
@@ -996,7 +996,8 @@ const renderErrorCause = (cause: PrettyError, prefix: string) => {
return stack
}

class PrettyError extends globalThis.Error implements Cause.PrettyError {
/** @internal */
export class PrettyError extends globalThis.Error implements Cause.PrettyError {
span: undefined | Span = undefined
constructor(originalError: unknown) {
const originalErrorIsObject = typeof originalError === "object" && originalError !== null
1,223 changes: 941 additions & 282 deletions packages/effect/test/Cause.test.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/effect/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ const config: UserConfigExport = {
// test: {
// coverage: {
// reporter: ["html"],
// include: ["src/Duration.ts"]
// include: ["src/Cause.ts", "src/internal/cause.ts"]
// }
// }
}

0 comments on commit 502223a

Please sign in to comment.