Untitled
unknown
plain_text
3 months ago
153 B
2
Indexable
unction identity<T>(arg: T): T { return arg; } const result = identity<string>("Hello, Generics!"); console.log(result); // Output: Hello, Generics!
Editor is loading...
Leave a Comment
unction identity<T>(arg: T): T { return arg; } const result = identity<string>("Hello, Generics!"); console.log(result); // Output: Hello, Generics!