UNPKG

@launchmenu/core

Version:

An environment for visual keyboard controlled applets

22 lines 1.47 kB
import { IDataHook } from "model-react"; import { IAction } from "../_types/IAction"; import { IActionNode, IActionNodeWithTargets } from "../_types/IActionNode"; import { IActionTarget } from "../_types/IActionTarget"; /** * Creates a new action graph * @param targets The targets to retrieve all bindings and actions from * @param hook The data hook to subscribe to changes * @param collectTargets Whether to also collect the target per node * @returns The action graph */ export declare function createActionGraph<T extends boolean = false>(targets: IActionTarget[], hook?: IDataHook, collectTargets?: T): (T extends true ? IActionNodeWithTargets : IActionNode)[]; /** * Creates a new action handler tree for the given action. Note, it's not actually a fully proper tree, the same node may appear in the tree multiple times, so it's more like a DAG with a single source. * @param rootAction The action to create the handler graph for * @param targets The targets to retrieve all bindings and handlers from * @param hook The data hook to subscribe to changes * @param collectTargets Whether to also collect the target per node * @returns The action handler tree */ export declare function createActionHandlerTree<T extends boolean = false>(rootAction: IAction, targets: IActionTarget[], hook?: IDataHook, collectTargets?: T): T extends true ? IActionNodeWithTargets : IActionNode; //# sourceMappingURL=createActionHandlerTree.d.ts.map