▸ add(x
: any, y
: any): unknown
Adds two given inputs using the built-in operator+.
remarks
The function makes no assumptions about the input types. Number casting is not performed on the augend, so operations including string concatenations will work perfectly, unlike in the safe version.
#
Parameters:Name | Type | Description |
---|---|---|
x | any | The augend. |
y | any | The addend. |
Returns: unknown
The result of the addition or concat.
Defined in: unsafe/math/add.ts:14