-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
ATA for tsserver on web #46862
ATA for tsserver on web #46862
Conversation
For #45314 This prototypes ATA for the web version of TypeScript. The logic is copied from the `@typescript/ata` project The current implementation is not complete, mainly because I don't understand how to get the d.ts files into the TS project correctly
To test this:
Note that at the moment the import doesn't actually get resolved properly. You don't get any intellisense if you are typing in the |
Oh cool, I missed this. Yeah, where the source of truth for the files lives is a bit of a tricky one. There's a few potential options:
I feel like the first one is probably more logical overall? |
@orta Good point. My current approach would never be able to support features such as I wonder if we should have the web typing installer delegate the actually installation back to VS Code. That's the first approach I considered with this PR, but it seemed overly complicated when I thought about it. However that seems like it could cleaner than using the emit apis (which VS Code doesn't use at all currently) To implement type installation on the VS Code side, I think we need:
Is that similar to what you were thinking? |
I've been thinking about this a lot (and tried knocking something together from your PR to explore it), and there is still the issue that with this ATA solution TS would be using the latest versions of every package, meaning a high likelihood of providing incorrect typings. However, it seems like what you've suggested above actually goes part way to a solution for full type acquisition. In essence, it seems like the above is needed in both directions, since:
For a bit of context, we're specifically interested in this for utopia, where previously we were running a tsserver worker in the browser to build the user's project (providing all files upfront, storing them in memory via BrowserFS, updating and emitting the incremental build results after each file change), so that we then could provide the full set of types to Monaco (as we were using that as the file editor at the time) - maybe that's an avenue that would be of interest? |
After microsoft/vscode#184438 I think this one's no longer up to date or where we're going. |
For microsoft/vscode#172887
This prototypes ATA for the web version of TypeScript. The logic is copied from the
@typescript/ata
projectThe current implementation is not complete, mainly because I don't understand how to get the d.ts files into the TS project correctly
/cc @orta @DanielRosenwasser