Vad är TypeScript? Programmeringsspråk, baserat på och som kompletterar JavaScript - Limetta Digitalbyrå
Technology

What is TypeScript? From obscure to obvious

The trend clearly shows that web applications continue to increase, which in turn leads to the amount of code running in the browser growing every year. At Limetta we continuously adopt new technology that helps us build better solutions. We see that a particularly notable new technology is the programming language TypeScript, which has great practical significance for delivering and maintaining error-free systems more quickly.

TypeScript has grown and reached a level of maturity that makes it an almost indispensable tool for front-end development. More and more projects at Limetta are based on this ingenious programming language.

 

About TypeScript

TypeScript is a programming language, based on JavaScript and inspired by C#/C++/Java, which was started under Microsoft's auspices in 2012 but has since become an open source project. The goal was to create a new programming language that could complement the de facto standard for programming on the web, JavaScript. The key word is indeed complement, not replace. Unlike other languages that previously failed to replace JavaScript, TypeScript embraces its predecessor and adds features instead of completely revising the language and its syntax. That, together with the way Microsoft has solved this, makes TypeScript a winner.

TypeScript adds what has long been missing in JavaScript: types, classes, interfaces, typed variables, enumerables, generics, union types and much more that back-end developers in languages like C# and Java have benefited from for many years. A back-end developer will feel at home in TypeScript, and a front-end developer will gain new tools to express their code.

Benefits of TypeScript

Because TypeScript is fully backward-compatible with JavaScript, JavaScript developers can build on existing skills, which is of course a major advantage. Furthermore, all code can be converted from JavaScript to TypeScript simply by changing the source file extension from .js to .ts. It is optional which code is upgraded since JavaScript and TypeScript can be easily mixed. This means older projects can adopt TypeScript gradually instead of being faced with an all-or-nothing choice.

Vad är TypeScript? Fördelen att det är bakåtkompatibelt med JavaScript - Limetta Digitalbyrå
Some positive effects of TypeScript's functionality
  • Harder to make mistakes when programming because the type system sets boundaries for the code.
  • Clearer, self-documenting code with the help of classes, interfaces and typed variables.
  • Better support in development environments in the form of "intellisense" and similar tools.
  • Better opportunities for refactoring code.
  • Enables better analysis of codebases.

Who should use TypeScript?

 

Anyone who writes non-trivial code in JavaScript.

For example:

  • Front-end projects with extensive or advanced logic and data
  • Back-end projects running on Node.js
  • Code libraries

 

Examples of systems written in TypeScript:

  • Angular
  • Dojo
  • Ionic
  • VSCode
  • MobX
  • RxJs

 

We use TypeScript in several of our solutions and are happy to tell you more!


Would you like to know more about how
we can help you?


Get in touch with us and we'll tell you more.

Contact us


Also read