Skip to main content

getNotSetSentinel

Callable

  • getNotSetSentinel(size: number): number

  • Returns the sentinel value (not-set indicator) for a given index size.

    @example
    const sentinel = getNotSetSentinel(IndexSize.UInt16); // Returns 0xffff
    if (index === sentinel) {
    console.log('Value is not set');
    }

    Parameters

    • size: number

      The size of the array that is indexed (number of elements)

    Returns number

    The appropriate sentinel value (0xff, 0xffff, or 0xffffffff)