/** * Educational error-handling patterns shown at the end of docs/ref-errors.md. * * These patterns are not per-error examples (those live on ErrorDefinition.examples). * They are pattern-level illustrations consumed by generate-error-docs.ts. */ /** * A single example block rendered inside an error-handling pattern's * fenced code section. The description is emitted as a `# {description}` * comment line above the code body. */ export interface ErrorHandlingExample { /** Comment line rendered as `# {description}` above the code */ readonly description: string; /** Multi-line rill code body */ readonly code: string; } /** * A top-level error-handling pattern section. Each pattern renders as an * H3 heading, a prose intro, and a single fenced code block that contains * all examples separated by blank lines. */ export interface ErrorHandlingPattern { /** Section heading (e.g., "Defensive Checks") */ readonly title: string; /** One-line prose introducing the pattern */ readonly intro: string; /** Fence language for the code block (always 'rill') */ readonly fence: 'rill'; /** Example blocks rendered inside the fence, separated by blank lines */ readonly examples: readonly ErrorHandlingExample[]; } /** * Pattern-level illustrations appended to the generated error reference * under the "Error Handling Patterns" section. Consumed by * `scripts/generate-error-docs.ts`. */ export declare const ERROR_HANDLING_PATTERNS: readonly ErrorHandlingPattern[];