Reference · Cube engine and views
ReplayClocktype
The clock a replay runs by; the page's own unless a test gives another.
Import it
import type { ReplayClock } from "@johnmorrisdotca/kyuubu";
Definition
type ReplayClock = {
set(run: () => void, ms: number): unknown;
clear(handle: unknown): void;
};
Members
| Name | Type | Description |
|---|---|---|
set | (run: () => void, ms: number): unknown | |
clear | (handle: unknown): void |
Examples
import type { ReplayClock } from "@johnmorrisdotca/kyuubu";
const value: ReplayClock = { set: (run, ms) => setTimeout(run, ms), clear: (handle) => clearTimeout(handle as ReturnType<typeof setTimeout>) };
console.log(typeof value.set);functionWhat it prints (run when this page was built)