Feature #77900

Introduce TypeScript for the core

Added by Frank Naegler about 3 years ago. Updated about 2 years ago.

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

100%

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.

Associated revisions

Revision 922e71cc (diff)
Added by Frank Naegler about 3 years ago

[FEATURE] Introduce TypeScript processing

This patch introduce a grunt TypeScript processor and linter.

Resolves: #77900
Releases: master
Change-Id: I642db25c84946a97687e1aaa9e1c5e0599618073
Reviewed-on: https://review.typo3.org/49895
Tested-by: TYPO3com <>
Tested-by: Marco Bresch <>
Reviewed-by: Stefan Neufeind <>
Reviewed-by: Wouter Wolters <>
Tested-by: Wouter Wolters <>

Revision b633be9b (diff)
Added by Frank Naegler about 3 years ago

[FOLLOWUP][FEATURE] Introduce TypeScript processing

This patch add npm update to fix broken travis builds.

Resolves: #77900
Releases: master
Change-Id: I5a3df419f33ec944673f043375eb14350034b1b6
Reviewed-on: https://review.typo3.org/50160
Tested-by: TYPO3com <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Gerrit Code Review about 3 years ago

  • Status changed from In Progress to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49895

#2 Updated by Gerrit Code Review about 3 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49895

#3 Updated by Gerrit Code Review about 3 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49895

#4 Updated by Gerrit Code Review about 3 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49895

#5 Updated by Gerrit Code Review about 3 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49895

#6 Updated by Gerrit Code Review about 3 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49895

#7 Updated by Gerrit Code Review about 3 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49895

#8 Updated by Gerrit Code Review about 3 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49895

#9 Updated by Gerrit Code Review about 3 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49895

#10 Updated by Gerrit Code Review about 3 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49895

#11 Updated by Dmitry Dulepov about 3 years ago

The core should switch to TypeScript for the internal JavaScript stuff.

Do you care to explain why? Or is it just "because"?

#12 Updated by Wouter Wolters about 3 years ago

Why 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.

#13 Updated by Wouter Wolters about 3 years ago

  • Description updated (diff)

#14 Updated by Gerrit Code Review about 3 years ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49895

#15 Updated by Gerrit Code Review about 3 years ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49895

#16 Updated by Gerrit Code Review about 3 years ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49895

#17 Updated by Frank Naegler about 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#18 Updated by Gerrit Code Review about 3 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50160

#19 Updated by Gerrit Code Review about 3 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50160

#20 Updated by Gerrit Code Review about 3 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50160

#21 Updated by Frank Naegler about 3 years ago

  • Status changed from Under Review to Resolved

#22 Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF