Files
cannaiq/frontend/node_modules/es-toolkit/dist/function/identity.d.mts
2025-11-28 19:45:44 -07:00

23 lines
416 B
TypeScript

/**
* Returns the input value unchanged.
*
* @template T - The type of the input value.
* @param {T} x - The value to be returned.
* @returns {T} The input value.
*
* @example
* // Returns 5
* identity(5);
*
* @example
* // Returns 'hello'
* identity('hello');
*
* @example
* // Returns { key: 'value' }
* identity({ key: 'value' });
*/
declare function identity<T>(x: T): T;
export { identity };