decimal
import { decimal } from "jsr:@ende/http/unstable-structured-fields";function ยท experimental
function decimal(value: number): Extract<BareItem, { type: "decimal" }>Creates a decimal Bare Item.
value: numberThe decimal value. Must be finite with an integer part of at most 12 digits; validated during serialization.
Returns
A Bare Item of type decimal.
Example: Usage
import { decimal } from "@ende/http/unstable-structured-fields";
import { assertEquals } from "@ende/assert";
assertEquals(decimal(3.14), { type: "decimal", value: 3.14 });