CompressedId64Set.isValid Function

Returns true if ids is a valid CompressedId64Set — either an empty string (representing an empty set) or a non-empty string beginning with '+'. Useful as a type guard to distinguish a compressed set from an Id64String or other value when the type of a string is not known statically.

isValid(ids: unknown): ids is string

@note This is a syntactic prefix check only — it does not validate the encoded content after '+'. A value may pass this guard and still throw during iterator (e.g. '+0' or '+garbage').

@see iterable to iterate the Ids represented by a compressed string.

Parameter Type Description
ids unknown  

Returns - ids is string

Defined in

Last Updated: 27 June, 2026