npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vs-compat-ts-plugin

v5.0.0

Published

TypeScript language service plugin to let more plugins work in Visual Studio.

Downloads

112

Readme

vs-compat-ts-plugin

Node version Known Vulnerabilities Build License

TypeScript language service plugin to let more plugins work in Visual Studio.

Many language service plugins work perfectly in VS Code, but using them in Visual Studio will break due to various niggles. Ideally these would all be fixed without hacks like this but this plugin can be used as a temporary measure until then.

Compatibility

  • Node: >= 18
  • TypeScript >= 2.9

Installation

npm install --save-dev vs-compat-ts-plugin

Enable the plugin in your tsconfig.json file

{
  "compilerOptions": {
    "plugins": [
      { "name": "vs-compat-ts-plugin" },
      { "name": "other-plugin" },
      ...
    ]
  }
}

or with configuration as

{
  "compilerOptions": {
    "plugins": [
      {
        "name": "vs-compat-ts-plugin",
        "workingDirectory": ".",
        "useVSTypescript": true,
        "onByDefault": true
      },
      { "name": "other-plugin" },
      ...
    ]
  }
}

Always make sure this is the first plugin in the list, as it effects how other plugins will be loaded.

You will likely need to restart Visual Studio for any of these settings to take effect

Configuration

workingDirectory (string or null - default '.')

This can set the working directory for the rest of the plugins. In many editors this seems to default to the workspace, but in Visual Studio it tends to be System32.

Relative to the tsconfig. Null means do not set a working directory.

useVSTypescript (bool - default true)

Language service plugins should be using the version of TypeScript that's passed to them by tsserver. Tools they use, such as linters, tend to use the standard require('typescript') to pick up TypeScript. When tsserver is running from local npm depencencies, this is fine and both TypeScript will be the same module. In Visual Studio, tsserver runs from a separate installation and so these modules are likely to be different. The result is various difficult to diagnose errors in plugins.

This option mocks require('typescript') so that tools pick up the same TypeScript version that tsserver is running from.

onByDefault (bool - default true)

By default, all options are enabled with sensible defaults. This means new features could be enabled in minor releases updates. These changes should not break functionality but since this whole plugin is a hack, there is a small risk. If you don't want this behaviour, turn this option off. You can then enable features individually.

License

MIT