import { c as DocumentAst, et as SourceFile } from "./parse-Bl1gwWGn.mjs"; import { l as SymbolTable } from "./symbol-table-en_Bich3.mjs"; import { Result } from "@prisma-next/utils/result"; import { ContractSourceContext, ContractSourceDiagnostic, ContractSourceDiagnostics, ContractSourceProvider, PslContractSourceProvider } from "@prisma-next/config/config-types"; import { Contract } from "@prisma-next/contract/types"; //#region src/interpret.d.ts /** * Lets editor tooling that already parses incrementally (e.g. the language * server) hand cached artifacts to the interpreter instead of forcing a * disk re-parse. */ interface PslInterpretInput { readonly document: DocumentAst; readonly sourceFile: SourceFile; readonly symbolTable: SymbolTable; readonly sourceId: string; } /** * Declared here — the authoring layer that owns `DocumentAst` / `SourceFile` / * `SymbolTable` — because `@prisma-next/config` (core) cannot name authoring * types. `interpret` must not read disk or `context.resolvedInputs` — those * are load-path concerns. */ interface PslInterpretCapable extends PslContractSourceProvider { interpret(input: PslInterpretInput, context: ContractSourceContext): Result; } /** * Merges caller-side diagnostics (e.g. parse / symbol-table findings) into an * interpretation result. The authored headline is deliberately uniform — it * reports how many errors the schema has, never which pipeline stage found * them. */ declare function withSeedDiagnostics(result: Result, seedDiagnostics: readonly ContractSourceDiagnostic[]): Result; /** The single seam that narrows a contract source to the interpret capability. */ declare function hasPslInterpreter(source: ContractSourceProvider): source is PslInterpretCapable; //#endregion export { type PslInterpretCapable, type PslInterpretInput, hasPslInterpreter, withSeedDiagnostics }; //# sourceMappingURL=interpret.d.mts.map