Skip to content

identity() function

与えられた引数と同じ値を返します。

Signature:

typescript
declare function identity<T>(a: T): T;

Example

ts
identity(5); // 5

Open Source Code

Released under the Apache-2.0 License.