import * as A from "../../Collections/Immutable/Array/index.js"; import type { FiberID } from "../../Fiber/id.js"; import type { Trace } from "../../Fiber/tracing.js"; import * as S from "../../IO/index.js"; import * as O from "../../Option/index.js"; import type { Cause } from "../cause.js"; export declare type Segment = Sequential | Parallel | Failure; export declare type Step = Parallel | Failure; export interface Failure { _tag: "Failure"; lines: string[]; } export interface Parallel { _tag: "Parallel"; all: Sequential[]; } export interface Sequential { _tag: "Sequential"; all: Step[]; } export declare function Failure(lines: string[]): Failure; export declare function Sequential(all: Step[]): Sequential; export declare function Parallel(all: Sequential[]): Parallel; export declare type TraceRenderer = (_: Trace) => string; export interface Renderer { renderError: (error: E) => string[]; renderTrace: TraceRenderer; renderUnknown: (error: unknown) => string[]; } export declare function headTail(a: readonly A[] & { 0: A; }): [A, A[]]; export declare function prefixBlock(values: readonly string[], p1: string, p2: string): string[]; export declare function renderInterrupt(fiberId: FiberID, trace: O.Option, traceRenderer: TraceRenderer): Sequential; export declare function renderError(error: Error): string[]; export declare function renderDie(error: string[], trace: O.Option, traceRenderer: TraceRenderer): Sequential; export declare function renderFail(error: string[], trace: O.Option, traceRenderer: TraceRenderer): Sequential; export declare function lines(s: string): string[]; export declare function linearSegments(cause: Cause, renderer: Renderer): S.IO; export declare function parallelSegments(cause: Cause, renderer: Renderer): S.IO; export declare function renderToString(u: unknown): string; export declare function causeToSequential(cause: Cause, renderer: Renderer): S.IO; export declare function renderTrace(o: O.Option, renderTrace: TraceRenderer): string[]; export declare function times(s: string, n: number): string; export declare function format(segment: Segment): readonly string[]; export declare function prettyLines(cause: Cause, renderer: Renderer): S.IO>; export declare function prettyM(cause: Cause, renderer: Renderer): S.IO; export declare function defaultErrorToLines(error: unknown): string[]; export declare const defaultRenderer: Renderer; /** * Returns a `String` with the cause pretty-printed. */ export declare const pretty: (cause: Cause, renderer?: Renderer) => string; //# sourceMappingURL=index.d.ts.map