Skip to main content

getNotSetSentinel

Callable

  • getNotSetSentinel(size: number): number

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

    @deprecated

    Derives the sentinel from the length of the indexed table, which is not what the writer keys the width on - use getNotSetSentinelForIndexWidth with the channel's BYTES_PER_ELEMENT instead. The size parameter is an element count, so passing an IndexSize member yields the u8 sentinel for every width.


    Parameters

    • size: number

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

    Returns number

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