Skip to content

LineItem

One phase’s one billing line: what was consumed, and what that costs.

get amount(): Amount;

Amount


get displayQuantity(): string;

The quantity at display precision, for a column a human scans.

string


get duration(): Duration | null;

Duration | null


get line(): string | null;

The AWS billing line, or null for a phase with no published rate to attribute it to.

string | null


get note(): string;

string


get phase(): string;

string


get quantity(): string;

The consumed quantity, exact, as a string.

Exact so a reader can check the arithmetic against the rate table, which is the only defence against a rate that drifts without anyone noticing.

string


get unit(): string;

string

toJson(): string;

Core’s JSON shape for a line item, as a JSON string.

A string rather than an object because the unpriced case must omit the usd key entirely, and a #[napi(object)] return type cannot express an absent key — an Option field serializes as null, which is the one value that gets summed as zero by anything permissive. A caller does JSON.parse, which is one visible step.

string


toString(): string;

string

This page is generated from bindings/microvms-js/index.d.ts by TypeDoc 0.28.20 and typedoc-plugin-markdown 4.13.1, run from site/scripts/gen-reference.mjs on every pnpm run sync, so an edit made here is overwritten by the next run.

To change the page, change the doc comment in the binding’s Rust source, then regenerate the declarations with mise run dts. mise run dts:check fails when the committed file no longer matches the source.