Function pointerSetInfer

  • Helper method for inferring types, 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 store = PointerSetInfer<ValueType>()(fields, blockSize, rawFields)
    // note the empty () here --------------^^

    Type Parameters

    Returns (<K, R>(fields: K, blockSize?: number, rawFields?: R) => PointerSet<T, K, R>)

      • <K, R>(fields: K, blockSize?: number, rawFields?: R): PointerSet<T, K, R>
      • Type Parameters

        • K extends readonly string[]

        • R extends readonly string[] = []

        Parameters

        • fields: K
        • Optional blockSize: number
        • Optional rawFields: R

        Returns PointerSet<T, K, R>

Generated using TypeDoc