Why Typescript ❓
There is no question that javascript cannot do what typescript can but it is one of the biggest reforms for developers in javascript programming. These are some of the known pros of using typescript -
- Giving full confidence in forcing standardization on the type of input & output.
- Code Readability.
- Robustness in code.
And what typescript does not -
- controlling the run-time error.
- typing automatically.
Now let's review this code without types -
And the same code with types -
Both code does the same job, but the one with type gives the great level of type safety and auto-completion. Identification of type related issues early before going to production. This permits unit tests to fail if there is any type mismatch.
Concluding, to make this possible, each developer at tradeling follows -
- Typing each variable, function, object & no hacks allowed.
- We use only those third party libraries which support typescript.
- Standardization of creating types for variables, functions, objects etc
- Typing all API's request & response.
- We type all react components
- Typescript everywhere...
Are you considering changing from .js
to .ts
? Add your thoughts in comment section.