Skip to content

Workspace.getMostRecentLeaf method

Workspace › getMostRecentLeaf

Official

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 | undefined): WorkspaceLeaf | null

Parameters:

ParameterTypeDescription
root?WorkspaceParent | undefinedThe root to search. If not provided, the rootSplit and pop-out windows are searched.

Returns: WorkspaceLeaf | null — The leaf, or null if there is none.

Since: 0.15.4