UNPKG

material-motion

Version:

Makes it easy to add rich, interactive motion to your application.

14 lines (13 loc) 737 B
import { Constructor, Dict, MotionReactiveNextOperable, MotionTimestampable, ObservableWithMotionOperators } from '../types'; export declare type RewritableOptions<U> = Partial<{ defaultValue: U | symbol; emitOnKeyChange: boolean; }>; export declare type RewriteArgs<T, R, U> = RewritableOptions<U> & { mapping: Dict<R> | Map<T, R>; }; export interface MotionRewritable<T> { rewrite<U, R extends U | ObservableWithMotionOperators<U>>(kwargs: RewriteArgs<T, R, U>): ObservableWithMotionOperators<U>; } export declare const SUPPRESS_FAILURES: symbol; export declare function withRewrite<T, S extends Constructor<MotionReactiveNextOperable<T> & MotionTimestampable<T>>>(superclass: S): S & Constructor<MotionRewritable<T>>;