UNPKG

chessground12

Version:
18 lines (17 loc) 601 B
import type { State } from './state'; import { KHz, Key, NumberQuad, Piece } from './types'; export type Mutation<A> = (state: State) => A; export type AnimVector = NumberQuad; export type AnimVectors = Map<Key, AnimVector>; export type AnimFadings = Map<Key, Piece>; export interface AnimPlan { anims: AnimVectors; fadings: AnimFadings; } export interface AnimCurrent { start: DOMHighResTimeStamp; frequency: KHz; plan: AnimPlan; } export declare function anim<A>(mutation: Mutation<A>, state: State): A; export declare function render<A>(mutation: Mutation<A>, state: State): A;