Skip to content

playerony/steps-for-porting-app-from-javascript-to-typescript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Steps for porting an application from javascript to typescript

1. Change file extensions and fixing broken tests

  • Rename *.js to *.ts, allowing implicit any,

  • Fix only things that are not type-checking, or causing compile errors,

  • Get tests passing again,

2. Explicit any

  • "noImplicitAny": true,

  • Where possible, provide a specific and appropriate type,

  • Get tests passing again,

3. Enable strict mode

  • "strict": true,

  • "strictNullChecks": true,

  • "strictFunctionTypes": true,

  • "strictBindCallApply": true,

  • "strictPropertyInitialization": true,

  • Replace explicit anys with more appropriate types,

  • Try to avoid unsafe casts,

About

Steps for porting an application from javascript to typescript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published