Workspace.getLeavesOfType method
Workspace › getLeavesOfType
Official
Get all leaves of a given type.Signature:
getLeavesOfType(viewType: string): WorkspaceLeaf[]Parameters:
| Parameter | Type | Description |
|---|---|---|
| viewType | string | The view type. |
Returns: WorkspaceLeaf[]
Since: 0.9.7
Unofficial
Get leaves of a specific view type.Declared before the
string overload, which would otherwise match every literal first.Signature:
getLeavesOfType(viewType: TViewType): TypedWorkspaceLeaf<ViewTypeViewMapping[TViewType]>[]Parameters:
| Parameter | Type | Description |
|---|---|---|
| viewType | TViewType | The view type to get leaves for. |
Returns: TypedWorkspaceLeaf<ViewTypeViewMapping[TViewType]>[] — The leaves matching the given view type.