-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Cancellation Support in tsserver
Vladimir Matveev edited this page Oct 11, 2016
·
3 revisions
tsserver
on startup will try to load module ./cancellationToken
from the containing directory. This module should export a factory function that accepts a list of command line arguments and returns HostCancellationToken. tsserver will use this token to check if in-flight operation should be cancelled.
NOTE: This token will be used for all operations so if one operation is cancelled and cancellation was reported through the token then when another operation is started - token should be reset into the non-cancelled state.
Default implementation of the cancellation token uses presence of named pipes as a way to signal cancellation.
- before spawning the server client generates a unique name. This name is passed to the server as a
cancellationPipeName
command line argument. - if some operation on the client side should be cancelled - client opens a named pipe with a name generated on step 1. Nothing needs to be written in the pipe - default cancellation token will interpret the presence of named pipe as a cancellation request.
- After receiving acknowledgment from the server client closes the pipe so it can use the same pipe name for the next operation.
News
Debugging TypeScript
- Performance
- Performance-Tracing
- Debugging-Language-Service-in-VS-Code
- Getting-logs-from-TS-Server-in-VS-Code
- JavaScript-Language-Service-in-Visual-Studio
- Providing-Visual-Studio-Repro-Steps
Contributing to TypeScript
- Contributing to TypeScript
- TypeScript Design Goals
- Coding Guidelines
- Useful Links for TypeScript Issue Management
- Writing Good Design Proposals
- Compiler Repo Notes
- Deployment
Building Tools for TypeScript
- Architectural Overview
- Using the Compiler API
- Using the Language Service API
- Standalone Server (tsserver)
- TypeScript MSBuild In Depth
- Debugging Language Service in VS Code
- Writing a Language Service Plugin
- Docker Quickstart
FAQs
The Main Repo