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