import type { CompilerScanResult, ScanFacts } from "../typestyle/check.js";

export type ScanSourceKind = "local" | "github" | "memory" | "fixture";

export interface ScanSource {
  kind: ScanSourceKind;
  root: string;
  ref?: string;
  readFile(path: string): Promise<string | null>;
}

export interface ScanSourceFile {
  relPath: string;
  absPath?: string;
  size?: number;
}

export interface ScanSourceWithFactsInput {
  source: ScanSource;
  facts: ScanFacts;
  files: readonly ScanSourceFile[];
}

export type ScanSourceWithFactsResult = CompilerScanResult;
