@northguild/gmt
Version:
Date and time library for JavaScript and TypeScript, built on TC39 Temporal: time zones, DST, business days, ISO 8601 strings in and out. Never throws.
25 lines • 1.57 kB
TypeScript
import { DefectId, ProbeRepro } from "./probeRepros.js";
/**
* Zoned defects worked around in `internal/zonedWallClock*`: the range-limit defects (upstream
* issue drafts A, B and D in the CORE-6 polyfill research) and zoned.E, the transition search
* floored at 1847-01-01 (js-temporal/temporal-polyfill#372). Canary-only: no capability probe
* gates them, because those fallbacks already run only when the polyfill throws, returns an
* unchecked UTC value, or (zoned.E) is asked about an instant before 1847, where GMT computes the
* spec's answer from offsets.
*/
export type ZonedDefectId = "zoned.A" | "zoned.B" | "zoned.D" | "zoned.E";
/**
* Canary-only groups no capability probe gates. D9 (`largeMonthSpan.ts`): a probe large enough to
* show the cost would be the abort itself, and timing is not deterministic; the workaround runs
* only for amounts of at least `LARGE_MONTH_SPAN` months and computes the spec's answer. D21
* (`clock.ts`): the guard compares each `Temporal.Now` reading with `Date.now()` and never fires
* on a fixed runtime. Neither changes any output when the polyfill is fixed.
*/
export type BoundedWorkDefectId = "D9" | "D21";
export interface Repro extends Omit<ProbeRepro, "defect"> {
defect: DefectId | ZonedDefectId | BoundedWorkDefectId;
}
export declare const repros: readonly Repro[];
/** The repro with this defect, calendar and name, if any. */
export declare function findRepro(defect: DefectId | ZonedDefectId | BoundedWorkDefectId, calendar: string, name: string): Repro | undefined;
export type { DefectId };