Are TypeScript project references helpful with noEmit?

Viewed 958

I'd like to improve editor interaction speed and the time that tsc takes to run over my TypeScript code. One of the standard ways to do this is with project references. There have been many reports of teams getting significant speedups by adopting these.

There are a few natural breaks in my code that I could turn into separate projects:

root/
  client/
    src/
    test/
  server/
    src/
    test/
  common/
    src/
    test/

I have noEmit set in my tsconfig.json because my workflows generally do not require tsc to emit .js or .d.ts files. I build my client code using webpack, for example, and I iterate on my server code using ts-node. I have TypeScript error checking disabled for both of these (--transpileOnly) and primarily check for type errors in VS Code and by running tsc as a git pre-push hook.

My understanding was that TypeScript project references required you to emit .js and .d.ts files. The canonical project-references-demo project does this. Is this correct? Will VS Code (via tsserver) get faster if I adopt project references without emitting JavaScript? Will tsc --noEmit get faster, too? Are there any examples of TypeScript projects using noEmit that get a significant speedup from adopting project references?

0 Answers
Related