/** * Create a new timer and starts the timing right away. Returns a closed object * instead of a class to make sure the variables are bound correctly. */ declare function timer(): { startMs: number; endMs: number; stop(): void; restart(): void; elapsedMs(): number; toString(): string; }; /** Defines the type of the Timer object. */ type Timer = ReturnType; export { type Timer, timer };