Skip to main content

Function: validateMonitorType()

validateMonitorType(type: unknown): type is "http" | "http-keyword" | "http-status" | "http-header" | "http-json" | "http-latency" | "port" | "ping" | "dns" | "ssl" | "websocket-keepalive" | "server-heartbeat" | "replication" | "cdn-edge-consistency"

Defined in: shared/utils/validation.ts:33

Determines whether a value matches a supported monitor type.

Parametersโ€‹

typeโ€‹

unknown

Value to evaluate as a monitor type.

Returnsโ€‹

type is "http" | "http-keyword" | "http-status" | "http-header" | "http-json" | "http-latency" | "port" | "ping" | "dns" | "ssl" | "websocket-keepalive" | "server-heartbeat" | "replication" | "cdn-edge-consistency"

true when the value is a member of MonitorType.

Remarksโ€‹

Valid monitor types are sourced from BASE_MONITOR_TYPES, covering all HTTP, port, ping, DNS, and extended monitor categories available in the platform.