Skip to content

Add a mode to tsc that defers to a possibly-running tsc "watch mode" instance #42838

Open
@alexweej

Description

Suggestion

Currently my projects have an npm script defined to run tsc --watch. I also have a test script configured. When working interactively, I don't want my test to wait 10s while it builds from scratch, when watch mode was running, and I just need to ask the running instance to let me know when the current generation of the source has been fully processed.

However, if I'm for some reason not running watch mode, like if someone unfamiliar with the project checks out the repo and tries to run npm test, or a CI system that has no special accommodations, it'd be useful if it went ahead and did a fresh build.

(Watch mode is great, I wish this idea was more commonplace!)

🔍 Search Terms

watch mode, incremental, npm, test

✅ Viability Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    In DiscussionNot yet reached consensusSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions