source: node_modules/es-toolkit/dist/function/identity.d.mts

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 416 bytes
RevLine 
[a762898]1/**
2 * Returns the input value unchanged.
3 *
4 * @template T - The type of the input value.
5 * @param {T} x - The value to be returned.
6 * @returns {T} The input value.
7 *
8 * @example
9 * // Returns 5
10 * identity(5);
11 *
12 * @example
13 * // Returns 'hello'
14 * identity('hello');
15 *
16 * @example
17 * // Returns { key: 'value' }
18 * identity({ key: 'value' });
19 */
20declare function identity<T>(x: T): T;
21
22export { identity };
Note: See TracBrowser for help on using the repository browser.