<!-- Do not edit this file. It is automatically generated by API Documenter. --> [`Workspace`](Workspace) › [`getLeavesOfType`](Workspace/getLeavesOfType) ## Workspace.getLeavesOfType() method Get all leaves of a given type. 0.9.7 **Signature:** ```typescript getLeavesOfType(viewType: string): WorkspaceLeaf[]; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | <code>viewType</code> | <code>string</code> | | **Returns:** [`WorkspaceLeaf`](WorkspaceLeaf)`[]`