Workspace โ€บ getMostRecentLeaf

Workspace.getMostRecentLeaf() method

Get the most recently active leaf in a given workspace root. Useful for interacting with the leaf in the root split while a sidebar leaf might be active.

Signature:

getMostRecentLeaf(root?: WorkspaceParent): WorkspaceLeaf | null;

Parameters

ParameterTypeDescription
rootWorkspaceParent(Optional) Root for the leaves you want to search. If a root is not provided, the rootSplit and leaves within pop-outs will be searched.

Returns:

WorkspaceLeaf | null