Function namedtuple

  • Creates a function that can be used to create named tuple-like objects.

    Example

    let Point = namedtuple('x', 'y', 'z')
    let userObj = User(0, 0, 0)
    // {x: 0, y: 0, z: 0}

    Returns

    A function that can be called with the field values

    Parameters

    • Rest ...fields: string[]

      A list of field names

    Returns ((...args: any[]) => any)

      • (...args: any[]): any
      • Parameters

        • Rest ...args: any[]

        Returns any

Generated using TypeDoc