Skip to content

add ​

Adds the provided number to the current number and returns the result. The method is a readable arithmetic helper and does not mutate any state.

Usage ​

ts
const total = (10).add(5);

// 15

Parameters

value: number
Value to add.

Returns

The sum.

Type signature ​

ts
interface Number {
    add(value: number): number;
}

All packages are released under the MIT License.