Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
5 tasks done
fordneild opened this issue Jun 3, 2023 · 0 comments
Open
5 tasks done
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript

Comments

@fordneild
Copy link

fordneild commented Jun 3, 2023

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.

@RyanCavanaugh RyanCavanaugh added Suggestion An idea for TypeScript Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature labels Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants