import type { EdgeTriple as InternalEdgeTriple } from '../../graph.js'; import type { EdgeTriple, NodeId, TarballKey } from './graph.js'; import type { LockfileErrorCode } from './errors.js'; export type DiagnosticSeverity = 'info' | 'warning' | 'error'; export type DiagnosticCode = LockfileErrorCode | 'STORE_PATH_RESOLVED' | 'STORE_CANDIDATE_CORRUPT' | 'STORE_READ_FAILED' | 'STORE_WRITE_FAILED' | 'STORE_CAPACITY_EXCEEDED' | 'STORE_EVICTION_FAILED' | 'CONVERT_FROZEN_ORACLE_MISMATCH' | `BUN_${string}` | `COMPLETENESS_${string}` | `COMPLETION_${string}` | `CONVERT_${string}` | `DENO_${string}` | `ENRICH_${string}` | `INTEROP_${string}` | `LAYOUT_${string}` | `MODIFY_${string}` | `NPM_${string}` | `OVERRIDE_${string}` | `PNPM_${string}` | `PROJECTION_${string}` | `PRUNE_${string}` | `RECIPE_${string}` | `YARN_${string}`; export interface Diagnostic> = Readonly>> { readonly code: Code; readonly subject?: NodeId | EdgeTriple | TarballKey; readonly severity: DiagnosticSeverity; readonly message: string; readonly data?: Data; } export type DiagnosticObserver = (diagnostic: Diagnostic) => void; export interface ObserveOptions { readonly onDiagnostic?: DiagnosticObserver; } export declare function publicEdgeTriple(value: InternalEdgeTriple): EdgeTriple; export declare function internalEdgeTriple(value: EdgeTriple): InternalEdgeTriple;