Files
DefinitelyTyped/types/ewma/index.d.ts
Tristan F 1e9b0c1017 🤖 Merge PR #63012 Add new typings for ewma in NPM by @LeoDog896
* base ewma set

* Update types/ewma/index.d.ts

Remove UMD

Co-authored-by: Adam Thompson-Sharpe <adamthompsonsharpe@gmail.com>

Co-authored-by: Adam Thompson-Sharpe <adamthompsonsharpe@gmail.com>
2022-11-02 04:27:20 -07:00

24 lines
620 B
TypeScript

// Type definitions for ewma 2.0
// Project: https://github.com/ReactiveSocket/ewma#readme
// Definitions by: LeoDog896 <https://github.com/LeoDog896>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface ClockLike {
now: () => number;
}
interface EwmaClass {
insert: (x: number) => void;
reset: (x: number) => void;
value: () => number;
}
interface EwmaInstance {
new (halfLifeMs: number, initialValue: number, clock?: ClockLike): EwmaClass;
(halfLifeMs: number, initialValue: number, clock?: ClockLike): EwmaClass;
}
declare const EWMA: EwmaInstance;
export = EWMA;