r3bl-ts-utils
Version:
The `r3bl-ts-utils` package is a set of useful TypeScript functions and classes that can be used in Node.js and browser environments. They are inspired by Kotlin stdlib, and Rust to write code as expressions rather than statements, colorized text, powerfu
18 lines (17 loc) • 462 B
TypeScript
import { State } from "./externals";
import { TimerInternal } from "./internals";
interface StartAction {
type: "start";
startTime: number;
}
interface StopAction {
type: "stop";
stopTime: number;
}
export declare type Actions = StartAction | StopAction;
declare type ReducerFnType = (timer: TimerInternal, currentState?: State, action?: Actions) => State;
/**
* @throws TimerErrors
*/
export declare const reducerFn: ReducerFnType;
export {};