OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Can I use ts files the exactly same way I use js files?

  • Thread starter Thread starter Siael Alves
  • Start date Start date
S

Siael Alves

Guest
I've heard about TypeScript and I liked it, because I've always liked making annotations on my code. However, I would have to rename all my .js files to .ts files. I would like to add annotations to my functions with all TypeScript capabilities without renaming my files. But, as I learned later, that is not possible. So, my question is: Can I continue typing js code normally after renaming them to .ts extension?

I have already added some annotations like

@param{string} argumentExplanation

and this is helping very much. However I would like to do more than this to help on my code. The reason is that the code annotations will help me to create a future documentation about my project.

<p>I've heard about TypeScript and I liked it, because I've always liked making annotations on my code. However, I would have to rename all my <strong>.js</strong> files to <strong>.ts</strong> files. I would like to add annotations to my functions with all TypeScript capabilities without renaming my files. But, as I learned later, that is not possible. So, my question is: <em>Can I continue typing js code normally after renaming them to <strong>.ts</strong> extension?</em></p>
<p>I have already added some annotations like</p>
<p><strong><code>@param</code></strong><code>{string} argument</code><em><code>Explanation</code></em></p>
<p>and this is helping very much. However I would like to do more than this to help on my code. The reason is that the code annotations will help me to create a future documentation about my project.</p>
 

Latest posts

Top