API reference@evolu/commonType › negativeDecimalString

const negativeDecimalString: BrandFactory<
  "NegativeDecimalString",
  DecimalString,
  NegativeDecimalStringError
>;

Defined in: packages/common/src/Type.ts:7174

DecimalString Brand requiring a value less than zero.

Example

import { assertOk, DecimalString, negativeDecimalString } from "@evolu/common";

const Negative = negativeDecimalString(DecimalString);

assertOk(Negative.fromUnknown("-0.5"), "-0.5");