Explore enabling type acquisition for web TS Server
See original GitHub issueFollow up on #39707
Overview
We now have TSServer running in web environments, but it is currently limited to single file intellisense. It would be nice if we could also offer some IntelliSense for third party packages that are imported in the current file.
If a user is trying out react for example, we should be able to offer IntelliSense for React
and ReactDOM
:
//@ts-check
import * as React from 'react';
import * as ReactDOM from 'react-dom';
class HelloMessage extends React.Component {
render() {
return (
<div>
Hello {this.props.name}
</div>
);
}
}
ReactDOM.render(
<HelloMessage name="Taylor" />,
document.getElementById('hello-example')
);
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:14 (12 by maintainers)
Top Results From Across the Web
Investigate entities on devices using live response
Live response is designed to enhance investigations by enabling your security operations team to collect forensic data, run scripts, ...
Read more >TSConfig Reference - Docs on every TSConfig option
Enabling the option allows importing JSON, and validating the types in that JSON file. ts. // @filename: settings.json. {. "repo" ...
Read more >Remote Development Tips and Tricks - Visual Studio Code
Visual Studio Code Remote Development troubleshooting tips and tricks for SSH, Containers, and the Windows Subsystem for Linux (WSL)
Read more >./orta@mastodon.social --degrowth -- on Twitter: "- Spaghetti ...
It's now much simpler and leans on the TS compiler much more to do the complex stuff. ... Explore enabling type acquisition for...
Read more >Usage - code-server v4.8.0 docs - Coder
This option requires that the remote machine be exposed to the internet. Make sure that your instance allows HTTP/HTTPS traffic. You'll need a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I recently re-wrote the ATA for the Playground ( https://github.com/microsoft/TypeScript-Website/pull/1997 ) in what I think is a pretty good conceptual pattern:
ts.preprocessFile
to extract that)@types/module
and grab the .d.ts files for that module.d.ts
files and recurse grabbing their modules etcIt’s not exactly like that in practice (you need the version number before you can make that API call to jsdelivr) - but that’s good enough and you can read the implementation linked above for more details. The implementation of the TypeScript Playground ATA is built for third parties, so you could be a consumer of
@typescript/ata
when that PR lands.An ideal state for VS Code which would keep this entirely first-party, is that the npm registry adds two APIs like:
https://registry.npmjs.org/npm/:version_or_tag/contents
which returns some sort of file listhttps://registry.npmjs.org/npm/:version_or_tag/file/package.json
which returns a CDN’d file from the tarball (in this case thepackage.json
)Or vscode creates an API which proxies these APIs to jsdelivr (they’re real nice folks, I can make an intro if needed) which allows for other implementations behind the scenes in time.
We are already watching - ping me any time if needed 😄