type ResolveContext = { parentURL?: string; conditions: string[]; }; type Resolved = { url: string; format?: string | null; shortCircuit?: boolean; }; type NextResolve = (specifier: string, context: ResolveContext) => Resolved | Promise; type LoadContext = { format?: string | null; conditions: string[]; }; type Loaded = { format: string; source?: string | ArrayBuffer; shortCircuit?: boolean; }; type NextLoad = (url: string, context: LoadContext) => Loaded | Promise; /** * Two rescues, both attempted ONLY after normal resolution has failed. * * `./x.js` → `./x.ts` when the sibling exists. * * This is the TypeScript ESM convention (`tsc` under `nodenext` requires the * `.js` extension in the source), which `tsx` implements and native Node does * not. It is the ONE divergence that matters in practice: this repository's own * dogfood specs import `src/core/spec.js`, a file that does not exist on disk. * Attempted only AFTER normal resolution fails, so it can never shadow a real * `.js` file. * * Then `vigiles` / `vigiles/` against the CLI's own install. Without * it, a repo with no `node_modules/vigiles` — every Python, Rust or Go repo, * where there is not even an install to run — could not compile a spec at all: * `init` scaffolded `import { instructionFile } from "vigiles/spec"` and * `compile` exited 1 with `ERR_MODULE_NOT_FOUND`. `vigiles test` had carried * this rescue since #184; the spec host did not, which is the whole reason the * branch now lives in one shared module rather than in each hook. */ export declare function resolve(specifier: string, context: ResolveContext, nextResolve: NextResolve): Promise; /** Transpile `.ts`/`.mts` with the TypeScript this package already ships. */ export declare function load(url: string, context: LoadContext, nextLoad: NextLoad): Promise; export {}; //# sourceMappingURL=spec-hooks.d.mts.map