@types/timer-machine
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

Installation

npm install --save @types/timer-machine

Summary

This package contains type definitions for timer-machine (https://github.com/brentburg/timer-machine).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/timer-machine.

index.d.ts

export as namespace Timer;
export = Timer;

declare namespace Timer {
    type TimerEvent = "start" | "stop" | "time";
}

declare class Timer {
    static get(reference: string): Timer;
    static destroy(reference: string): Timer;

    constructor(started?: boolean);

    isStarted(): boolean;
    isStopped(): boolean;
    start(): void;
    timeFromStart(): number;
    stop(): void;
    time(): number;
    toggle(): void;
    emitTime(): void;
    valueOf(): number;
    on(event: Timer.TimerEvent, callback?: () => void): void;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by Dolan Miu.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/timer-machine

Weekly Downloads

68

Version

1.1.3

License

MIT

Unpacked Size

3.64 kB

Total Files

5

Last publish

Collaborators

  • types