website/static/worker.js/serializeAst
function serializeAst(ast) {
  return JSON.stringify(
    ast,
    (_, value) =>
      value instanceof Error
        ? { name: value.name, message: value.message, ...value }
        : typeof value === "bigint"
        ? `BigInt('${String(value)}')`
        : value,
    2
  );
}