UNPKG

@bufbuild/cel

Version:

A CEL evaluator for ECMAScript

15 lines (14 loc) 543 B
import { type Duration } from "@bufbuild/protobuf/wkt"; /** * Create a new Duration, validating the fields are in range. */ export declare function createDuration(seconds: bigint, nanos: number): Duration; /** * Parses a CEL duration string. * * A duration string is a possibly signed sequence of * decimal numbers, each with optional fraction and a unit suffix, * such as "300ms", "-1.5h" or "2h45m". * Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". */ export declare function parseDuration(str: string): Duration;