Project

General

Profile

Actions

Feature #77900

closed

Introduce TypeScript for the core

Added by Frank Nägler over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Backend API
Target version:
Start date:
2016-09-09
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

The core should switch to TypeScript for the internal JavaScript stuff.
For this issue we need a TypeScript processor, which generates AMD modules.

Why should we use TypeScript in the core?

TypeScript is a free and open source programming language developed and maintained by Microsoft. It is a strict superset of JavaScript, and adds optional static typing and class-based object-oriented programming to the language.

With TypeScript it is possible to compile JavaScript. TypeScript supports definition files which can contain type information of existing JavaScript libraries.

At the moment the core uses AMD modules for any JavaScript logic in the backend, but what is in 5 years? maybe we want switch to CommonJS, with TypeScript we can recompile all modules with a simple change in a configuration file.

But the main reason to switch to TypeScript is the strict typing and oop structure of the language. We can make use of Interfaces, which is still a missing feature in JavaScript.

Actions

Also available in: Atom PDF