<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[`Workspace`](Workspace) › [`iterateAllLeaves`](Workspace/iterateAllLeaves)
## Workspace.iterateAllLeaves() method
Iterate through all leaves, including main area leaves, floating leaves, and sidebar leaves.
0.9.7
**Signature:**
```typescript
iterateAllLeaves(callback: (leaf: WorkspaceLeaf) => any): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| <code>callback</code> | <code>(leaf: </code>[`WorkspaceLeaf`](WorkspaceLeaf)<code>) => any</code> | |
**Returns:**
`void`