2

Is there a "correct" order to start converting JavaScript to TypeScript? In my case, everything is mostly in Angular so there are a few controllers and services.

What would should be the first step? This is what I currently have:

  • App.js
  • Controller1.js ...
  • Service1.js ..
  • angular/jQuery.js

More information: I am using VS Code to do this and the project I would like to convert is a SharePoint app.

1

1 Answer 1

7

What would should be the first step? This is what I currently have:

Add a tsconfig.json with allowJs set to true. TypeScript understands JavaScript! Then you will start the change the extensions of the file from .js to .ts one by one.

More

I did a video on the subject: https://www.youtube.com/watch?v=gmKXXI_ck7w and also created a tool (that you can use in combination with vscode or whatever other IDE you want) to help people like you: http://alm.tools/ 🌹.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.