3

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?

1
  • The question is worth answering. But it's not confirmed that ts compilation is the bottleneck in your case, in case this is the actual problem. TS itself commonly isn't used to compile .ts at all in speedy setups. Did you check angular.dev/tools/cli/build-system-migration ? Commented Jun 11 at 20:32

1 Answer 1

7

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.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.