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

@mizchi/ts

v0.6.0

Published

TypeScript <-> MoonBit bridge generator

Readme

mizchi/ts

Status: Experimental

MoonBit と TypeScript の間で bridge package を生成する toolchain です。TypeScript の 型定義から MoonBit bridge を生成し、MoonBit package から JavaScript runtime と .d.ts を持つ npm package を生成します。生成物は再生成可能な output として扱います。

Quick start

TypeScript dependencies を MoonBit から使う場合:

moon install mizchi/ts/cmd/ts2mbt
ts2mbt generate

MoonBit package を npm package にする場合:

moon install mizchi/ts/cmd/mbt2ts
cd my-moonbit-library
mbt2ts --pkg
cd npm && npm publish --access public

公開済み @mizchi/ts の type checker は global install なしで実行できます。

npx --package=@mizchi/ts mtsc --help

Hono を MoonBit から使う完全な手順は Quick start を参照してください。

Requirements

  • MoonBit toolchain(moon が $PATH にあること)
  • Node.js 24+
  • pnpm(verification scripts 用)
  • 任意: just

Install

moon install mizchi/ts/cmd/ts2mbt
moon install mizchi/ts/cmd/mbt2ts

# 両方を一度に install
moon install mizchi/ts/...

install 後は ~/.moon/bin/ を $PATH に追加します。source checkout から実行する 場合は moon run src/cmd/{ts2mbt,mbt2ts} -- ... を使います。

Tools

| Tool | 概要 | 詳細 | | -------- | -------------------------------------------------------------- | ------------------------------------ | | ts2mbt | TypeScript declaration / npm package を MoonBit bridge に変換 | docs/ts2mbt.md | | mbt2ts | MoonBit package を TypeScript declaration / npm package に変換 | docs/mbt2ts.md | | mtsc | TypeScript / TSX を型検査して JavaScript に変換 | docs/mtsc.md |

tscheck と tsacc は開発用 command であり、公開 tool には含めません。

Generated package contract

  • ts2mbt の output は consumer module の internal/generated/ に置く bridge package です。SCAFFOLD_DIAGNOSTICS.md で widen / omit した surface を確認します。
  • mbt2ts --pkg の output は npm/ です。moon.mod の version と metadata を使い、 package.json、index.js、.d.ts、subpath export、必要なら npm bin を生成します。
  • どちらも output を手編集せず、入力と option から再生成してください。

詳細な type boundary、facade、runtime validation、package export、unsupported surface は 各 tool guide に記載しています。

Diagnostics and examples

  • docs/ts2mbt.md — SCAFFOLD_DIAGNOSTICS.md、vendor と bridge。
  • docs/mbt2ts.md — AUTOLINK_DIAGNOSTICS.md、npm publish。
  • docs/mtsc.md — checker の CLI、ABI、既知ギャップ。
  • examples/ — just verify-examples で検証する runnable fixture。

Development

moon fmt
moon info
just check
just test
just verify-scaffolds
just verify-examples

checker の TypeScript conformance gate は次を使います。

just checker-conformance-oracle --max-fp 0 --max-legal-parsefail 1

軽量な conformance 集計には tsacc guide を参照してください。

優先度と既知の制約は checker priority を参照してください。

License

Apache-2.0