DEV Community


Code of the day (Learning Typescript)

cizu64 profile image charles ・1 min read

Typescript is really cool, thanks to Microsoft. I just started learning hybrid app development and I am deliberating whether to use ReactNative or NativeScript. I think I would learn NativeScript faster as it has direct support for TypeScript and I have a long background on the .NET Framework.

Code of the day


function identity(arg: T): T {
return arg;

let gen = identity>(["Welcome to genrics in TypeScript",1,(2+2),"Hi"]);

Converted Javascript

function identity(arg) {
return arg;
var gen = identity(["welcome to genric", 1, (2 + 2), "Hi"]);

Your welcome to join me as we learn together.

Discussion (0)

Editor guide