• Parse a generated enum that is based on a minimal perfect hash.

    Type Parameters

    • T extends number

    Parameters

    • typeMap: default<T>

      The map to the enum type using a minimal perfect hash that doesn't require string extraction.

    • input: Uint8Array

      The input buffer.

    • cursor: number

      The offset in the input buffer where the enum may be.

    • endCursor: number

      The end point of the parse which should not be overflowed.

    Returns undefined | T

    The matching enum value or undefined if none matches or the parse fails.