/** * Extracts the number of milliseconds since the Unix epoch that had passed when * the ULID was generated. If the ULID is malformed, an error will be thrown. * * @example Decode the time from a ULID * ```ts * import { decodeTime, ulid } from "mod.ts"; * import { assertEquals } from "../assert/mod.ts"; * * const timestamp = 150_000; * const ulidString = ulid(timestamp); * * assertEquals(decodeTime(ulidString), timestamp); * ``` * * @param ulid The ULID to extract the timestamp from. * @returns The number of milliseconds since the Unix epoch that had passed when the ULID was generated. */ export declare function decodeTime(ulid: string): number;