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

0.0.2 • Public • Published

Installation

npm install --save @types/fps

Summary

This package contains type definitions for fps (https://github.com/hughsk/fps).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fps.

index.d.ts

export as namespace fps;

interface FPSOptions {
    /** How many frames to tick before emitting. Defaults to 1. */
    decay?: number;
    /** The rate of change between old and new results. 1 is instantaneous, 0 is never. */
    every?: number;
}

interface FPSObject {
    tick: () => void;
    on: (event: "data", callback: (frames: number) => void) => void;
    last: number;
    rate: number;
    time: number;
    decay: number;
    every: number;
    ticks: number;
}

declare function fps(options?: FPSOptions): FPSObject;

export = fps;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by LeoDog896.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/fps

Weekly Downloads

49

Version

0.0.2

License

MIT

Unpacked Size

3.57 kB

Total Files

5

Last publish

Collaborators

  • types