
TypeScript is an open source programming language intended to optimize the use of JavaScript. Appeared in 2012, it was created by Anders Hejlsberg within the Microsoft company.
→ You must be bilingual (Fr/En). Code examples are in English.
→ Let's start with very simple codes. The more you progress, page after page, the more sophisticated the scripts will be. However, you must go over 30 to 40 pages per level, before moving on to the next step...
→ In order to evaluate your codes, click on the icon on the left at the bottom of the page (gears), then choose a compiler from the list that will be open in another tab. Finally, test your work.
NOW REPRODUCE AND IMMERSE YOURSELF!
console.log('Hello world!');
function multiply(a: number, b: number) {
class NamedValue<T> {
const city: { type: string, kmdistance?: number } = {
type: "New York"
};city.kmdistance = 6000;
console.log(city);
const city: { type: string, kmdistance?: number } = {
type: "New York"
};city.kmdistance = 6000;
console.log(city);
const beach: { type: string, kmdistance?: number } = {
type: "Kenuga Beach"
};beach.kmdistance = 8000;
console.log(beach);
class NamedValue<T> { private _value: T | undefined;
constructor(private name: string) {}
public setValue(value: T) {
this._value = value;
}public getValue(): T | undefined {
return this._value;
}public toString(): string {
return `${this.name}: ${this._value}`;
}
}
const value = new NamedValue<number>('myNumber');value.setValue(44);
console.log(value.toString()); // myNumber: 44
function multiply(a: number, b: number, c:number) {
function multiply(a: number, b: number, c:number, d:number, e:number) {

CHOOSE YOUR COMPILER
Reproduce this code, choosing one of the compilers below (don't copy and paste! It would be too easy). They all have the same function, just choose one according to your preferences.
When copying your code, replace the existing (default) code already in the compiler with your own.
Warning! For some of these compilers, you must choose the programming language yourself from the menu that is then offered. Of course, don't forget to click on RUN!
Code
Recent versions
Tools/Methodologies
Test
Info+
» Creation date : 2012
* Created by Anders Hejlsberg at Microsoft
* Developed by Microsoft
* Written in Javascript and TypeScript
* Cross-platform
* Open Web Foundation License
News
The comments you leave us are systematically subject to rigorous moderation. Incivility and slander, threats, intimidation of all kinds, more generally all gratuitous verbal violence, or the dissemination of unverified information... are not tolerated. We also reserve the right to publish only comments which effectively advance the debate and allow a better understanding of the subject covered by the article presented on this page (as well as all its ramifications) and this, whatever its overall content.