microsoft / microsoft/TypeScript

Extend Watchfile options to allow for watching some files with higher priority.

Open
#54,511 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting More Feedback Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
1d 19h
Merged PRs (30d)
117

Description

Suggestion

🔍 Search Terms

  • Watch specific file
  • Restart part of TS server
  • send an event to ts server

✅ 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.

⭐ Suggestion

Provide the ability to watch some files closely for changes to make VSCode intellisense work faster.

📃 Motivating Example

I generate a some typescript code from an openapi specification, and the typescript language server fails to update the types in a timely manner.

💻 Use Cases

I want to use this to create a much much faster feedback loop between the API client type and the API sever contract.
Here is a possible flow:

  1. I make a change to my sever code (i.e. django app)
  2. Which generates a change to the schema (graphql, openapi, protobuff)
  3. Which generates some new typescript code
  4. Which is instantly available for my IDE, as if the server code was written in typescript in the same project.

All of this hopefully happens as fast as possible (maybe 250ms is reasonable)

Imagine TRPC, but make it for language-agnostic backends.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names TypeScript's watchfile options, the TypeScript language server, and VSCode IntelliSense, but no source files or tests. Start by locating the language-server watch handling and its existing watch options; the work is done when a specified set of files can be watched with higher priority and generated TypeScript updates reach IntelliSense promptly.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.