DEV Community

KIranuknow
KIranuknow

Posted on

Javascript to Typescript Tips

Some of the tips in migrating existing JavaScript code to TypeScript.

JavaScript

var name = "test";
Enter fullscreen mode Exit fullscreen mode

TypeScript

//declare fieldName as string
let name: string ;
name = "test";
Enter fullscreen mode Exit fullscreen mode

Top comments (0)