<!-- Do not edit this file. It is automatically generated by API Documenter. --> [`Workspace`](Workspace) › [`getMostRecentLeaf`](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:** ```typescript getMostRecentLeaf(root?: WorkspaceParent): WorkspaceLeaf | null; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | <code>root</code> | [`WorkspaceParent`](WorkspaceParent) | <p>_(Optional)_ Root for the leaves you want to search. If a root is not provided, the <code>rootSplit</code> and leaves within pop-outs will be searched.</p><p> 0.15.4</p> | **Returns:** [`WorkspaceLeaf`](WorkspaceLeaf)` | null`