← Files LogForgeARCHIVED FILE

examples/typescript/app.ts

413 Bytes · Nov 9, 2026 · 01:16 UTC

↓ Download file

import { LogForge, type Options } from "../../sdk/javascript/index.js";

interface Order { id: string; total: number; }
const order: Order = { id: "ts-order", total: 42 };
const options: Options = { tags: ["backend"], name: "checkout.typescript" };
LogForge.out("checkout", () => order, options);
LogForge.check("CHECKOUT", "checkout.total", () => order.total > 0, { tags: ["backend"] });
await LogForge.flush();

SHA-256: f0afe3aa1a896234c1434984f0ce93e37cad0810478073846f65b33a12e84160