We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e25f2b commit 10aedc0Copy full SHA for 10aedc0
generics.ts
@@ -0,0 +1,9 @@
1
+function identity<T>(arg: T): T {
2
+ return arg;
3
+}
4
+
5
+let str = identity("hello");
6
+let num = identity(5);
7
8
+console.log(str);
9
+console.log(num);
0 commit comments