@everwhen/temporal
Version:
_description_
20 lines (19 loc) • 1.09 kB
TypeScript
import { Temporal } from 'temporal-polyfill';
import { Duration } from './duration.ts';
import type { MethodParameters } from './type-utils.ts';
export type PlainTimeLike = Temporal.PlainTimeLike;
export declare class PlainTime extends Temporal.PlainTime {
static now(): PlainTime;
static from(...args: Parameters<typeof Temporal.PlainTime.from>): PlainTime;
static max(...dates: PlainTime[]): PlainTime;
static min(...dates: PlainTime[]): PlainTime;
compare(other: PlainTimeLike | string): Temporal.ComparisonResult;
isBefore(other: PlainTimeLike): boolean;
isAfter(other: PlainTimeLike): boolean;
add(...args: MethodParameters<Temporal.PlainTime, 'add'>): PlainTime;
subtract(...args: MethodParameters<Temporal.PlainTime, 'subtract'>): PlainTime;
round(...args: MethodParameters<Temporal.PlainTime, 'round'>): PlainTime;
until(...args: MethodParameters<Temporal.PlainTime, 'until'>): Duration;
since(...args: MethodParameters<Temporal.PlainTime, 'since'>): Duration;
with(...args: MethodParameters<Temporal.PlainTime, 'with'>): PlainTime;
}