function identity<Type>(arg: Type): Type {
return arg;
}
let fun = identity<string>("hello world");
console.log(fun);
/*think of this as you can specify the type later*/
/*Directly specifying version of the above would be something like
function identity(arg: string): string {
return arg;
}
let fun = identity("hello world");
console.log(fun);
*/