Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ICommonStats<T>

Type Parameters

  • T

Hierarchy

Index

Properties

count: number

number of items in the array

depth: number

in case of nested arrays what is the max nested depth

flatCount: number

number of items in the array

flatItems: readonly T[]

the items in this stats

flatMissing: number

number of missing items in the array

items: readonly (T | Set<T> | (readonly T[]))[]

the items in this stats

missing: number

number of missing items in the array

Methods

  • [toPrimitive](hint: "default"): string
  • [toPrimitive](hint: "string"): string
  • [toPrimitive](hint: "number"): number
  • [toPrimitive](hint: string): string | number
  • Converts a Stats object to a string.

    Parameters

    • hint: "default"

    Returns string

  • Converts a Stats object to a string.

    Parameters

    • hint: "string"

    Returns string

  • Converts a Stats object to a number.

    Parameters

    • hint: "number"

    Returns number

  • Converts a Stats object to a string or number.

    throws

    {TypeError} If 'hint' was given something other than "number", "string", or "default".

    Parameters

    • hint: string

      The strings "number", "string", or "default" to specify what primitive to return.

    Returns string | number

    A number if 'hint' was "number", a string if 'hint' was "string" or "default".

Generated using TypeDoc