import type { BaseGrader } from "./baseGrader.js"; import { type GradersSnapshot, type RecordedGraders } from "./gradingModule.js"; /** * A test's graders come from one of two sources: a `graders.ts` module or a * `graders.json` file. Each source does three things: load the graders live, * store them in a run directory, and load them back from the store. The * call sites look the source up here and never mention an extension or a * stored file's name. */ export type GraderSource = { matchesPath: (filePath: string) => boolean; matchesRecord: (recorded: RecordedGraders) => boolean; load: (filePath: string) => Promise; snapshot: (filePath: string) => Promise; loadSnapshot: (gradersDir: string, recorded: RecordedGraders) => Promise; }; export declare const MODULE_SOURCE: GraderSource; export declare const JSON_SOURCE: GraderSource; export declare function graderSourceForPath(filePath: string): GraderSource; export declare function graderSourceForRecord(recorded: RecordedGraders): GraderSource;