Why use TypeScript for your projects?

Tech and Architecture
Pourquoi utiliser TypeScript pour vos projets ?

This is the language to bet on right now! Created by Microsoft in 2012 with the aim of improving and making JavaScript development safer, it is today a fundamental element for the web developer. TypeScript is a language intended to be compiled into JavaScript.


The fact that TypeScript is a more strongly typed language than JavaScript makes it possible to detect a whole series of bugs at compile time. It allows us to create applications with a genuine structure and very high-quality tooling. But its real strength is that it can be compiled from any operating system, to any version of JavaScript, making it compatible with the majority of browsers. Here is a case study to help you become familiar with TypeScript.
How do you install TypeScript?


The simplest way to install TypeScript is via the NPM package manager. To do so, enter the following command in your terminal:
npm install -g typescript
Once installed, all you have to do is create a TypeScript file in your project (application, site, etc.) and add your tsconfig.json configuration file to it.


The basic tsconfig.json file was shown here as a CodePen (pen YjdJPj by Aaron, @leox47).


This is the basic file. It is also possible to customise it with numerous properties. You will find them easily on the official website.

An example of building something with TypeScript
In the example below, we created a module for loading SVG files asynchronously directly into the DOM. Loading SVGs asynchronously makes it possible to load the DOM faster (and therefore to optimise web performance), but above all to be able to modify them using CSS.
Let’s go! Let’s start by creating our object.
The object’s source code was shown here as a CodePen (pen OwrapW by Aaron, @leox47).


First of all, take a good look at the code and compare it with a basic block of JavaScript code. You will see a big difference in terms of structuring, and above all you will notice some interesting features.
For example, the first element (Interface) makes it possible to restrict the data type of a set of parameters. Here it corresponds to the configuration of our object. Instead of creating several blocks of checking code, you can do away with them altogether by typing your variables (string / number / Array / boolean / etc.). Another notable difference is that we can use a genuine object structure with private, static or public parameters and methods.


Our object has now been created, so it is time to use it! If it is used incorrectly, TypeScript will not compile our code into JavaScript, which will save us a lot of errors.
The usage example was shown here as a CodePen (pen KBbrmQ by Aaron, @leox47).


Once again, a few elements caught our attention: for example the use of the static method, which makes it possible to target an object directly without instantiating it. Or other methods that can only be used when an object is instantiated, such as destroy().
If you would like to know more about what’s new in TypeScript, version 3.0 was released at the end of July! You can discover its new features on the official site.


We take an interest in every facet of JavaScript, and in particular in the frameworks dedicated to it. More articles on web development are coming very soon on our blog.

How about we connect?

Shape your brand’s digital future. Whether you want to align your touchpoints, create unified customer experiences, or optimize your omnichannel ecosystem, we design solutions that blend innovation and elegance.

Parler à un expert

Insights,
the essentials

All news
Les 7 métiers de la tech incontournables en 2026
Tech and Architecture 05.08.2026

The 7 must-have tech jobs in 2026

Mehdi developpeur fullstack senior
Tech and Architecture 02.05.2024

Mehdi, Senior Full-Stack Developer at Numendo: “I was on a conventional path that I ended up not following”

prensentation de plusieurs logo digitalisés pour présenter le client Mzars
Tech and Architecture 05.01.2024

Client Case Study: How Mazars Switzerland transformed its customer relationship management with Zendesk

2 personnes signent un contrat pour présenter les métiers de la tech en 2024
Tech and Architecture 13.12.2023

Tech careers: 7 jobs recruiters are fighting over in 2024

Numendo Paris Agency

48 Rue de la Bienfaisance
75008 Paris

Our Paris agency supports brands and key accounts with their most strategic digital projects.

Located just 10 minutes from Saint-Lazare station and steps from the Miromesnil metro, it brings together our experts in consulting, e-commerce, product data, and omnichannel architecture.

Numendo Paris embodies the perfect synergy of strategic vision, technical expertise, and client proximity.

Be part of the adventure
Numendo Paris

Joining Numendo Paris means joining an innovation hub where technical excellence meets an entrepreneurial spirit. A stimulating environment to drive world-class strategic projects right in the heart of the capital.

Numendo Mulhouse Agency

2a Av. Auguste Wicky
68100 Mulhouse

The Mulhouse agency is our technical center of excellence dedicated to the performance of your business platforms.

Located in the heart of Alsace, steps from the Mulhouse train station and in close proximity to Germany and Switzerland, our office is home to a community of passionate experts focused on innovation and code robustness.

It embodies the group’s technological powerhouse, capable of building highly complex B2B and industrial ecosystems.

Be part of the adventure
Numendo Mulhouse

Thriving in Mulhouse means joining a historic hub where a passion for technology and team spirit take center stage. <br>A human-scale environment ideal for tackling large-scale industrial and technical challenges.

Numendo Genève Agency

Rue du Marché 5,
1204 Genève

Our Geneva agency combines a culture of precision with digital expertise to elevate your projects in Switzerland and internationally.

Ideally located in the very heart of Geneva, it offers a premium work environment to support the data transformation of the most demanding businesses.

Geneva is our dedicated hub for structuring product information and deploying agile and scalable e-commerce strategies, primarily within the luxury and finance sectors.

Be part of the adventure
Numendo Geneva

Being part of the Geneva team means cultivating high standards and precision to deliver high-performing, sustainable digital solutions.<br>An exceptional work environment to transform the future of product data and Swiss e-commerce.