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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@boperators/plugin-ts-language-server

v0.2.1

Published

TypeScript Language Server plugin for boperators - IDE support with source mapping.

Readme

@boperators/plugin-ts-language-server

Sym.JS logo

TypeScript Language Server plugin for boperators - provides IDE support with source mapping.

This plugin transforms operator overloads in the background and remaps positions between original and transformed source, so IDE features (hover, go-to-definition, diagnostics, completions, etc.) work correctly even though the language server sees the transformed code.

Installation

npm install -D boperators @boperators/plugin-ts-language-server

Setup

1. Add the plugin to your tsconfig.json

{
    "compilerOptions": {
        "plugins": [
            { "name": "@boperators/plugin-ts-language-server" }
        ]
    }
}

2. Configure your editor

TypeScript Language Service plugins are loaded by tsserver, which resolves them relative to the TypeScript installation it's using. If your editor uses its own bundled TypeScript (the default in VS Code), it won't find plugins installed in your project's node_modules.

VS Code

1. Add to your project's .vscode/settings.json:

{
    "typescript.tsdk": "./node_modules/typescript/lib"
}

This tells VS Code where to find the workspace TypeScript installation.

2. Select the workspace TypeScript version: open the command palette (Ctrl/Cmd+Shift+P) → "TypeScript: Select TypeScript Version" → "Use Workspace Version".

This is the critical step. VS Code defaults to its own bundled TypeScript, which resolves plugins relative to VS Code's installation directory — not your project's node_modules. Switching to the workspace version makes tsserver resolve plugins from your project's node_modules, where @boperators/plugin-ts-language-server is installed.

This choice is remembered per-workspace, so you only need to do it once.

Other editors

Ensure your editor's TypeScript integration uses the typescript package from your project's node_modules rather than a bundled version. The plugin must be resolvable via require("@boperators/plugin-ts-language-server") from the TypeScript installation directory.

Troubleshooting

If the plugin isn't loading, enable verbose tsserver logging to diagnose:

{
    "typescript.tsserver.log": "verbose"
}

Restart the TS server, then check the log output (shown in the VS Code Output panel → "TypeScript") for lines like:

  • Enabling plugin @boperators/plugin-ts-language-server from candidate paths: ... — shows where tsserver is looking
  • Couldn't find @boperators/plugin-ts-language-server — the plugin wasn't found in any candidate path
  • [boperators] Plugin loaded — the plugin loaded successfully

Features

  • Hover info: Hovering over an overloaded operator shows the overload signature and JSDoc
  • Diagnostics remapping: Errors and warnings point to the correct positions in your original source
  • Go-to-definition: Works correctly across transformed files
  • Completions: Autocomplete positions are remapped
  • References and rename: Find references and rename work across transformed boundaries
  • Signature help: Parameter hints are position-remapped

How It Works

The plugin intercepts getScriptSnapshot to transform each file on the fly, building a source map between original and transformed code. All Language Service methods that accept or return positions are proxied to remap through this source map. Overload definitions are cached and invalidated when files change.

License

MIT