summaryrefslogtreecommitdiffstats
path: root/fastdom.d.ts
blob: b3b3124b4907e66c1c9de5c5f3892e243ada0d4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Type definitions for fastdom v1.0.4
// Project: https://github.com/wilsonpage/fastdom
// Definitions by: Martijn Welker <https://github.com/martijnwelker>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

declare namespace fastdom {
    type CallbackFunction = () => void;

    const reads: CallbackFunction[];
    const writes: CallbackFunction[];
    const scheduled: boolean;
    const raf: (fn: CallbackFunction) => void;

    function measure(fn: CallbackFunction, args?: any): CallbackFunction;

    function mutate(fn: CallbackFunction, args?: any): CallbackFunction;

    function clear(fn: CallbackFunction): boolean;
}

export as namespace fastdom;
export = fastdom;