import type { DomainModule, LocalTargetKey } from "../annotations.js"; import { type Diagnostic } from "../diagnostics/types.js"; import { type ProgramNode } from "../parser/index.js"; import type { MelParamSource } from "./compile-fragment-types.js"; export declare const EMPTY_LOCATION: { start: { line: number; column: number; offset: number; }; end: { line: number; column: number; offset: number; }; }; export declare function editError(code: string, message: string, location?: ProgramNode["location"]): Diagnostic; export declare function diagnosticsOf(result: { warnings: readonly Diagnostic[]; errors: readonly Diagnostic[]; }): Diagnostic[]; export declare function parseProgram(source: string): { program: ProgramNode | null; diagnostics: Diagnostic[]; }; export declare function validateExpressionFragment(expr: unknown): Diagnostic[]; export declare function validateTypeFragment(typeSource: unknown): Diagnostic[]; export declare function validateStateFieldFragment(typeSource: unknown, defaultSource: string): Diagnostic[]; export declare function validateActionBodyFragment(body: unknown): Diagnostic[]; export declare function validateIdentifierFragment(value: unknown, label: string): Diagnostic[]; export declare function validateParamsFragment(params: unknown): Diagnostic[]; type ParamsFragmentSnapshot = { readonly ok: true; readonly value: readonly MelParamSource[]; readonly diagnostics: readonly Diagnostic[]; } | { readonly ok: false; readonly diagnostics: readonly Diagnostic[]; }; export declare function snapshotParamsFragment(params: unknown): ParamsFragmentSnapshot; type EditOperationKindRead = { readonly ok: true; readonly value: string; } | { readonly ok: false; readonly diagnostic: Diagnostic; }; export declare function readEditOperationKind(value: unknown): EditOperationKindRead; export declare function validateTarget(baseModule: DomainModule, target: unknown, allowedKinds: readonly string[]): Diagnostic | null; export declare function targetNotFound(target: LocalTargetKey): Diagnostic; export declare function targetKind(target: string): string | null; export {};