Adds a multi-file TSServer abstraction to the bug workbench #2063
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a new package to the monorepo, as well as some infra for using
esbuild
instead of TSC for some of the playground packages.The goal of this PR is to provide an editing experience for multi-file Playground samples. We already have "support" for Twoslash's
// @filename: abc.ts
in the bug-workbench, and now we have tooling support to back that up.The tooling is based on microsoft/monaco-typescript#65 which lets you override the class that Monaco TypeScript interacts with the TSServer in. My subclass creates an additional vfs layer on top of the existing vfs layer used by MonacoTS which switches out the files which TypeScript sees in comparison to the model file which Monaco keeps track of.
What this screenshot shows:
// @filename: input.tsx
is a decorator to help folks know what the 'default' file is.app.ts
inside this file