Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is it possible for Angular cli to use the new typescript compiler which is written in GO

I'm working on a big Angular project. The compilation time is quite long.

I've heard that Microsoft released a new typescript compiler, which is written in GO and is 10x faster than the previous versions.

How can I leverage new TypeScript compiler which is written in GO?

like image 945
Mustafa Bazghandi Avatar asked Dec 21 '25 22:12

Mustafa Bazghandi


1 Answers

TLDR: Today, no.
In the future yes, but it will require some additional work from the typescript team and from the Angular team.


Long Answer:

Angular builds applications with its own compiler called "NGC". NGC is a typescript programm (ts.Program) that basically wraps the typescript compiler.

NGC does call the typescript compiler APIs directly, not via the tsc command line.

Now that the typescript compiler is going native, this is no longer directly possible. It will require some additionnal work on both the Typescript team side and the Angular team side.

  • Typescript will need to expose IPCs to allow typescript programms like NGC to invoke the TSGo compiler from a node environment
  • Angular will need to refactor its compiler to adapt to those changes. The amount of work this represents today is unknown, as we don't know how many of today's TS APIs will be accessible via the promised IPCs.
like image 67
Matthieu Riegler Avatar answered Dec 24 '25 12:12

Matthieu Riegler