sitegen/framework/debug.safe.ts
chloe caruso 66da129036 rewrite incremental.ts (#21)
the problems with the original implementation was mostly around error
handling. sources had to be tracked manually and provided to each
incremental output. the `hasArtifact` check was frequently forgotten.
this has been re-abstracted through `incr.work()`, which is given an
`io` object. all fs reads and module loads go through this interface,
which allows the sources to be properly tracked, even if it throws.

closes #12
2025-08-02 20:56:36 -04:00

12 lines
277 B
TypeScript

globalThis.UNWRAP = (t, ...args) => {
if (t == null) {
throw new Error(
args.length > 0 ? util.format(...args) : "UNWRAP(" + t + ")",
);
}
return t;
};
globalThis.ASSERT = assert.ok;
import * as util from "node:util";
import * as assert from 'node:assert'