DieselDepot-APP/node_modules/es-toolkit/dist/fp/math/add.d.mts
SJCoetz def597c157 chore: add generated build artifacts and node module type files
add all Next.js build outputs and third-party dependency type declaration files
2026-07-20 01:18:42 +02:00

17 lines
No EOL
539 B
TypeScript

//#region src/fp/math/add.d.ts
/**
* Creates a function that adds `addend` to its input. Use it with {@link pipe},
* or as the callback of a function such as {@link map}.
*
* @param addend - The number to add to the input.
* @returns A function that maps a `number` to `value + addend`.
*
* @example
* import { pipe, map, add } from 'es-toolkit/fp';
*
* pipe(3, add(2)); // => 5
* pipe([1, 2, 3], map(add(10))); // => [11, 12, 13]
*/
declare function add(addend: number): (value: number) => number;
//#endregion
export { add };