blob: 6c3e1593e1219bcc643d8c624b655104d25f2f4a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeCompoundAction = exports.isCompoundAction = void 0;
/**
* Custom type guard to determine if an action is a CompoundAction.
*/
function isCompoundAction(action) {
return (action === null || action === void 0 ? void 0 : action.$kind) === "compoundAction";
}
exports.isCompoundAction = isCompoundAction;
/**
* Helper that returns a CompoundAction, given an ActionMetrics and ActionModel[] of subactions.
*/
function makeCompoundAction(actionMetrics, subactions) {
return {
$kind: "compoundAction",
subactions,
actionMetrics,
};
}
exports.makeCompoundAction = makeCompoundAction;
//# sourceMappingURL=compound-action.js.map
|