All files / xstate/es patterns.js

0% Statements 0/1
100% Branches 0/0
0% Functions 0/1
0% Lines 0/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8               
export function toggle(onState, offState, eventType) {
    var _a, _b, _c;
    return _a = {}, _a[onState] = {
        on: (_b = {}, _b[eventType] = offState, _b)
    }, _a[offState] = {
        on: (_c = {}, _c[eventType] = onState, _c)
    }, _a;
}