• Creates a new List containing values.

    const { List } = require('immutable');
    List.of(1, 2, 3, 4)
    // List [ 1, 2, 3, 4 ]

    Note: Values are not altered or converted in any way.

    const { List } = require('immutable');
    List.of({x:1}, 2, [3], 4)
    // List [ { x: 1 }, 2, [ 3 ], 4 ]

    Type Parameters

    • T

    Parameters

    • Rest ...values: T[]

    Returns <internal>.List<T>

Generated using TypeDoc