Documentation

add()

Adds the provided objects to the end of the list.

add(...items: T[]): this;

Parameters

Errors

This method throws an error if one of the objects is already in the list. This method throws an error if one of the objects isn’t of the correct type (see restrict()).

Related