Question

First of all, some background: I have an idea to make a CMS which hardly depends on JavaScript usage (I could be more specific, but this is not relevant for the question)

I wanted to ask, is it worth to use TypeScript for all JavaScript scripts used in CMS? Of course, not the external ones, which were written with pure JavaScript, but all custom ones, which could and would be used by other users, who might not know TypeScript... This would force them to learn write or at least read TypeScript..

I know that TypeScript compiles to pure JavaScript and its syntax is much like EcmaScript 6, but the compiled JS is not all the time very much readable...

Was it helpful?

Solution

If the static types will help you, then use it.

If you have very little JavaScript you need to weigh up the benefits of static types VS the extra step of transpiling to JavaScript.

In a larger project, things like interfaces, modules and classes tip the balance more towards TypeScript.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top