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

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

Added visualizations

  • Property mode set to 100644
File size: 815 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>(value: T): T;
21/**
22 * Returns the input value unchanged.
23 *
24 * @template T - The type of the input value.
25 * @param {T} x - The value to be returned.
26 * @returns {T} The input value.
27 *
28 * @example
29 * // Returns 5
30 * identity(5);
31 *
32 * @example
33 * // Returns 'hello'
34 * identity('hello');
35 *
36 * @example
37 * // Returns { key: 'value' }
38 * identity({ key: 'value' });
39 */
40declare function identity(): undefined;
41
42export { identity };
Note: See TracBrowser for help on using the repository browser.