Skip to content

Adds a multi-file TSServer abstraction to the bug workbench #2063

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

Merged
merged 6 commits into from
Oct 7, 2021
Merged

Conversation

orta
Copy link
Contributor

@orta orta commented Oct 6, 2021

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.

Screen Shot 2021-10-07 at 2 46 12 PM

What this screenshot shows:

  • The bug workbench which is a less-used fork of the playground which we can safely test these changes out
  • An extra // @filename: input.tsx is a decorator to help folks know what the 'default' file is.
  • Auto-complete working inside app.ts inside this file
  • Consolidated error messages across many files

@orta orta marked this pull request as draft October 6, 2021 16:55
@orta orta marked this pull request as ready for review October 7, 2021 13:40
@orta orta changed the title Switch some playground infra to run on esbuild and the start of a multi-file TSServer abstraction in bug workbench Adds a multi-file TSServer abstraction to the bug workbench Oct 7, 2021
@orta orta enabled auto-merge October 7, 2021 13:53
@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2021

Got false positives?

Make changes to the global settings spellcheck.json in /microsoft/TypeScript-Website.

Make changes to this repo's settings in spellcheck.json.

Typos for README.md

Line Typo
3 This is a WebWorker function which the Playground
3 how this works in this PR to monaco-typescript: https://github.com/microsoft
5 ch returns a subclass for the TSServer to monaco language bindings,

Generated by 🚫 dangerJS against 9ac98cb

@orta orta merged commit 22b762a into v2 Oct 7, 2021
@jakebailey jakebailey deleted the play-fast branch May 17, 2024 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant