Skip to content

Commit

Permalink
fixup! Add tree-related types
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlin committed Nov 8, 2024
1 parent c23fa12 commit 3f1cf35
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/actions/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ import { Metadata } from "../metadata";
import { AppDispatch, RootState } from "../store";
import { ReduxNode, TreeState } from "../reducers/tree/types";

type RootIndex = number | undefined

/** [root idx tree1, root idx tree2] */
export type Root = [number | undefined, number | undefined]
export type Root = [RootIndex, RootIndex]

/** A function to be handled by redux (thunk) */
type ThunkFunction = (dispatch: AppDispatch, getState: () => RootState) => void
Expand All @@ -31,7 +33,7 @@ type ThunkFunction = (dispatch: AppDispatch, getState: () => RootState) => void
*/
export const applyInViewNodesToTree = (
/** index of displayed root node */
idx: number | undefined,
idx: RootIndex,

tree: TreeState,
): number => {
Expand Down

0 comments on commit 3f1cf35

Please sign in to comment.