2

If you run tsc manually and use the param:

tsc --generateTrace traceDir

you can create a new traceDir directory with paired trace and types files. A recent analysis package from Microsoft typescript-analyze-trace can analyse those files.

Questions:

I wanted to configure generateTrace within tsconfig.json and couldn't find the equivalent property.

Is there a similar configuration option also in an angular app? I guess I can use the same property within angularCompilerOptions (if I knew what it is called)?

  • Are you trying to get the same file outputs, just automatically during a build process? – anthonyb Jul 04 '22 at 14:35
  • I'm sure you've already see this https://www.typescriptlang.org/docs/handbook/compiler-options.html generateTrace is a flag, not an option so it wouldn't have a parallel in the tsconfig file. What you could try doing is adding this command to one of your script shorthands, ie npm buildWithTrace : npm build projectName && tsc --generateTrace – anthonyb Jul 04 '22 at 14:45
  • yes, I know that, thank you, maybe it will then come soon as a tsconfig.json property, let’s see,I wanted to be sure,.. –  Jul 04 '22 at 14:49
  • 1
    yep, maybe soon. best of luck! – anthonyb Jul 04 '22 at 14:51
  • 1
    give your answer, say, it is not possible yet and get the bounty ;) –  Jul 04 '22 at 14:53

1 Answers1

1

I'm sure you've already seen this

https://www.typescriptlang.org/docs/handbook/compiler-options.html

generateTrace is a flag, not an option so it wouldn't have a parallel in the tsconfig file.

What you could try doing is adding this command to one of your script shorthands, ie npm buildWithTrace : npm build projectName && tsc --generateTrace

But otherwise, this doesn't seem to be possible yet.

anthonyb
  • 353
  • 1
  • 12