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