Skip to content

Workspace.getLeavesOfType method

Workspace › getLeavesOfType

Official

Get all leaves of a given type.

Signature:

getLeavesOfType(viewType: string): WorkspaceLeaf[]

Parameters:

ParameterTypeDescription
viewTypestringThe 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:

ParameterTypeDescription
viewTypeTViewTypeThe view type to get leaves for.

Returns: TypedWorkspaceLeaf<ViewTypeViewMapping[TViewType]>[] — The leaves matching the given view type.