Skip to content

Profectus / game/layers / getLayer

Function: getLayer() ​

getLayer<T>(layerID): T

Convenience method for getting a layer by its ID with correct typing.

Type Parameters ​

• T extends Layer

Parameters ​

layerID ​

string

The ID of the layer to get.

Returns ​

T

Defined in ​

profectus/src/game/layers.tsx:338