Function PointerSetInferFields

  • Helper method for generating a class that infers the field and rawField names, since TS generics are all-or-nothing, and we don't pass a value type in the constructor.

    const fields = ['my', 'fields'] as const
    const rawFields = ['raw'] as const
    const PSClass = PointerSetInferFields(fields, rawFields)
    const store = new PSClass<ValueType>(blockSize)

    Type Parameters

    • K extends readonly string[]

    • R extends readonly string[] = []

    Parameters

    • fields: K
    • Optional rawFields: R

    Returns typeof PointerSetInferFields

Generated using TypeDoc