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/cli

v0.2.1

Published

CLI tool for boperators - transforms TypeScript files with operator overloads.

Downloads

380

Readme

@boperators/cli

Sym.JS logo

CLI tool for boperators - transforms TypeScript files with operator overloads.

Installation

npm install -D boperators @boperators/cli

Usage

The CLI provides two subcommands via boperate (or the bop alias).

boperate compile

Injects operator overloads into your TypeScript files and emits JavaScript using your tsconfig.json settings.

# Compile to JavaScript (output goes to tsconfig's outDir)
boperate compile

# Use a specific tsconfig
boperate compile --project ./tsconfig.custom.json

# Also save the transformed TypeScript (e.g. to feed into another build tool)
boperate compile --ts-out ./transformed

# Only produce transformed TypeScript, skip JavaScript output
boperate compile --ts-out ./transformed --no-emit

# Also write source map files
boperate compile --ts-out ./transformed --maps-out ./maps

The CLI reads your tsconfig.json to determine which files to process and where to emit output. It parses overload definitions from all files (including dependencies), but only transforms and emits files within your project directory.

| Option | Alias | Default | Description | |--------|-------|---------|-------------| | --ts-out <dir> | -t | | Save the transformed TypeScript files to this directory (useful for further build tooling) | | --maps-out <dir> | -m | | Output directory for source map files (.map.ts) | | --project <path> | -p | tsconfig.json | Path to tsconfig.json to use | | --no-emit | | | Skip JavaScript output | | --error-on-warning | | false | Treat conflicting overload warnings as errors |

boperate validate

Validates that all classes with operator overloads are properly exported. Intended for library authors to run before publishing.

# Level 1 — check every overload class is exported from its source file
boperate validate

# Level 2 — also verify each class is reachable via your package entry point
boperate validate --entry src/index.ts

Exit code is 1 on violations (suitable for CI / prepublish scripts). Use --warn to emit warnings instead of errors.

| Option | Default | Description | |--------|---------|-------------| | --entry <path> | | Source entry point for deep reachability check (e.g. src/index.ts) | | --project <path> | tsconfig.json | Path to tsconfig.json to use | | --warn | false | Emit warnings instead of exiting with an error on violations |

Comparison with Other Approaches

| Approach | When it runs | Use case | |----------|-------------|----------| | @boperators/cli | Before compilation | Batch transform to disk, then compile normally | | @boperators/plugin-tsc | During compilation | Seamless tsc integration, no intermediate files | | @boperators/webpack-loader | During bundling | Webpack projects, integrates into existing build pipeline | | @boperators/plugin-vite | During bundling | Vite projects, integrates into Rollup-based pipeline | | @boperators/plugin-esbuild | During bundling | ESBuild projects, fast bundler integration | | @boperators/plugin-bun | At runtime | Bun-only, transforms on module load |

License

MIT