import { SumDB } from "./sumdb.js"; import { Result } from "../../util/result.js"; import { URI } from "langium"; import { ModuleContext } from "../context.js"; import { SemVer } from "../../util/semver.js"; /** * Validates the checksum of a module file against a stored value in the checksum database. * * If no checksum is stored for the given target and version, registers the current checksum. * If a checksum is stored, compares it with the calculated checksum and returns an error if they do not match. * * @param sums - The checksum database to retrieve and register checksums. * @param tmp - The URI of the temporary file to validate. * @param ctx - The module context for registration. * @param target - The module target identifier. * @param version - The semantic version of the module. * @returns A promise resolving to a Result indicating success or an error message if validation fails. */ export declare function ValidateChecksum(sums: SumDB, tmp: URI, ctx: ModuleContext, target: string, version: SemVer): Promise>;