import type { DocumentId, ParsedUnit, ParserDiagnostic, ParserResult } from "@oscharko-dev/keiko-contracts";
import type { ParserCapability, ParserErrorCode, ParserOptions } from "./types.js";
export declare function emptyResult(capability: ParserCapability, documentId: DocumentId, options: ParserOptions, diagnostics?: readonly ParserDiagnostic[], units?: readonly ParsedUnit[]): ParserResult;
export declare function diagnostic(code: ParserErrorCode, message: string, documentId: DocumentId, severity?: ParserDiagnostic["severity"]): ParserDiagnostic;
export interface LimitCheck {
    readonly stop: boolean;
    readonly code?: ParserErrorCode;
    readonly message?: string;
}
export declare function shouldStop(startedAt: number, options: ParserOptions, emittedUnits: number): LimitCheck;
export declare function oversizeDiagnostic(documentId: DocumentId, byteLength: number, maxBytes: number): ParserDiagnostic;
export interface DecodedText {
    readonly text: string;
    readonly bomBytes: number;
}
export declare function decodeUtf8(bytes: Uint8Array): DecodedText;
//# sourceMappingURL=_internal.d.ts.map