@mega-yfue/eufy-sdk / isKnownValueKind
Function: isKnownValueKind()
ts
function isKnownValueKind(kind): kind is "boolean" | "timestamp" | "enum" | "percent" | "celsius" | "dbm" | "seconds" | "hours" | "megabytes" | "degrees" | "scalar" | "bitfield" | "identifier" | "text";Whether a kind is one this version models, narrowing it to KnownValueKind.
The counterpart to leaving the union open: the compiler cannot tell a caller that a kind is one it has a branch for, because at a declaration site any string is accepted. This is how a caller writes the fallback branch the open union asks for — and, in the other direction, how the SDK's own specs catch a kind that was typed rather than modelled.
Parameters
kind
Returns
kind is "boolean" | "timestamp" | "enum" | "percent" | "celsius" | "dbm" | "seconds" | "hours" | "megabytes" | "degrees" | "scalar" | "bitfield" | "identifier" | "text"