Skip to content
pyautark (soon)

@urban-toolkit/autk-core


@urban-toolkit/autk-core / isLayerType

Function: isLayerType()

isLayerType(value): value is LayerType

Defined in: utils-layer.ts:25

Type guard checking whether a string is a supported shared layer type.

Parameters

value

string

Candidate layer identifier to validate.

Returns

value is LayerType

true when value is a recognized LayerType, narrowing the type.

Throws

Never throws.

Example

ts
if (isLayerType(userInput)) {
  // userInput is now typed as LayerType
}

Released under the MIT License.