π¦
Npm Typed.mbt
MCP server: Npm Typed.mbt
0 installs
11 stars
1 forks
Trust: 49 β Fair
Devtools
Installation
npx npm-typed-mbtAsk AI about Npm Typed.mbt
Powered by Claude Β· Grounded in docs
I know everything about Npm Typed.mbt. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
mizchi/npm_typed
Typed npm package bindings for MoonBit, built on top of mizchi/js.
Inspired by DefinitelyTyped - the repository for high quality TypeScript type definitions. This project aims to be the MoonBit equivalent, providing type-safe FFI bindings for popular npm packages.
Note: These bindings require installing the corresponding npm packages.
# Example: Install React dependencies npm install react react-dom # Example: Install Hono npm install hono
Installation
moon add mizchi/js
moon add mizchi/npm_typed
Add to your moon.pkg.json:
{
"import": [
"mizchi/js",
"mizchi/js/core",
"mizchi/npm_typed/react",
"mizchi/npm_typed/hono"
]
}
Available Packages
UI Frameworks
| Package | npm | Status | Note |
|---|---|---|---|
| react | react | π§ͺ Tested | Core React API |
| react_element | - | π§ͺ Tested | Typed HTML elements for React |
| react_dom | react-dom | π§ͺ Tested | React DOM |
| react_dom_client | react-dom/client | π§ͺ Tested | Client-side rendering |
| react_dom_server | react-dom/server | π§ͺ Tested | Server-side rendering |
| react_dom_static | react-dom/static | π€ AI Generated | Static rendering |
| react_router | react-router | π§ͺ Tested | Client-side routing |
| testing_library_react | @testing-library/react | π§ͺ Tested | React testing utilities |
| preact | preact | π§ͺ Tested | Lightweight React alternative |
| testing_library_preact | @testing-library/preact | π€ AI Generated | Preact testing utilities |
| ink | ink | π§ͺ Tested | React for CLI apps |
| ink_ui | @inkjs/ui | π§ͺ Tested | Ink UI components |
Web Frameworks
| Package | npm | Status | Note |
|---|---|---|---|
| hono | hono | π§ͺ Tested | Fast web framework, middleware support |
| better_auth | better-auth | π€ AI Generated | Authentication library |
| helmet | helmet | π§ͺ Tested | Security headers middleware |
AI / LLM
| Package | npm | Status | Note |
|---|---|---|---|
| ai | ai (Vercel AI SDK) | π§ͺ Tested | AI/LLM integration |
| modelcontextprotocol | @modelcontextprotocol/sdk | π§ͺ Tested | MCP server/client |
| claude_code | @anthropic-ai/claude-code | π€ AI Generated | Claude Code SDK |
Cloud Services
| Package | npm | Status | Note |
|---|---|---|---|
| client_s3 | @aws-sdk/client-s3 | π§ͺ Tested | S3-compatible storage (AWS, GCS, R2, MinIO) |
Database
| Package | npm | Status | Note |
|---|---|---|---|
| pglite | @electric-sql/pglite | π§ͺ Tested | Embedded PostgreSQL |
| duckdb | @duckdb/duckdb-wasm | π€ AI Generated | Analytical database |
| drizzle | drizzle-orm | π€ AI Generated | TypeScript ORM (see limitations) |
| pg | pg | π€ AI Generated | PostgreSQL client |
Validation / Schema
| Package | npm | Status | Note |
|---|---|---|---|
| zod | zod | π§ͺ Tested | Schema validation |
| ajv | ajv | π§ͺ Tested | JSON Schema validator |
Build Tools
| Package | npm | Status | Note |
|---|---|---|---|
| terser | terser | π§ͺ Tested | JavaScript minifier |
| vite | vite | π§ͺ Tested | Next-gen build tool |
| unplugin | unplugin | π€ AI Generated | Unified plugin system |
| lighthouse | lighthouse | π€ AI Generated | Web performance auditing |
| esbuild | esbuild | π§ͺ Tested | Fast bundler |
| oxc_minify | oxc-minify | π§ͺ Tested | Oxc minifier |
Utilities
| Package | npm | Status | Note |
|---|---|---|---|
| date_fns | date-fns | π§ͺ Tested | Date manipulation |
| semver | semver | π§ͺ Tested | Semantic versioning |
| chalk | chalk | π§ͺ Tested | Terminal styling |
| colorette | colorette | π§ͺ Tested | Terminal colors |
| dotenv | dotenv | π§ͺ Tested | Environment variables |
| chokidar | chokidar | π§ͺ Tested | File watching |
| yargs | yargs | π€ AI Generated | CLI argument parsing |
| debug | debug | π€ AI Generated | Debug logging |
| jose | jose | π§ͺ Tested | JWT/JWE/JWS |
| comlink | comlink | π€ AI Generated | Web Worker RPC |
| simple_git | simple-git | π€ AI Generated | Git operations |
| ignore | ignore | π€ AI Generated | .gitignore parsing |
| memfs | memfs | π§ͺ Tested | In-memory file system |
| minimatch | minimatch | π§ͺ Tested | Glob matching |
| execa | execa | π§ͺ Tested | Process execution |
| pino | pino | π§ͺ Tested | Fast logging |
| magic_string | magic-string | π§ͺ Tested | String manipulation |
Testing / Development
| Package | npm | Status | Note |
|---|---|---|---|
| vitest | vitest | π§ Partial | Test runner |
| puppeteer | puppeteer | π§ͺ Tested | Browser automation |
| playwright | playwright | π§ͺ Tested | Browser automation |
| playwright_test | @playwright/test | π€ AI Generated | Playwright test framework |
| jsdom | jsdom | π§ͺ Tested | DOM implementation |
| happy_dom | happy-dom | π§ͺ Tested | Fast DOM implementation |
| global_jsdom | global-jsdom | π§ͺ Tested | JSDOM for testing |
| testing_library | @testing-library/dom | π§ͺ Tested | DOM testing utilities |
| msw | msw | π§ͺ Tested | Mock Service Worker |
| ink_testing_library | ink-testing-library | π§ͺ Tested | Ink testing utilities |
Parsing
| Package | npm | Status | Note |
|---|---|---|---|
| htmlparser2 | htmlparser2 | π§ͺ Tested | HTML/XML parser |
| js_yaml | js-yaml | π€ AI Generated | YAML parser |
| source_map | source-map | π§ͺ Tested | Source map utilities |
| error_stack_parser | error-stack-parser | π§ͺ Tested | Stack trace parsing |
Status Legend
- π§ͺ Tested: Comprehensive test coverage
- π§ Partial: Core functionality implemented
- π€ AI Generated: Needs testing
Can't find your library?
You can easily add new bindings with AI assistance:
./_scripts/new-library.sh <package_name>
See CONTRIBUTING.md for details. Most bindings in this repository were generated with AI agents.
Quick Start
React Example
// moon.pkg.json: import mizchi/npm_typed/react, mizchi/npm_typed/react_element
fn counter(_props : Unit) -> @react.Element {
let (count, set_count) = @react.useState(0)
@react_element.div([
@react_element.span(["Count: \{count}"]),
@react_element.button(on_click=fn(_) { set_count(count + 1) }, ["+"]),
])
}
Hono Example
// moon.pkg.json: import mizchi/npm_typed/hono
async fn main {
let app : @hono.Hono[@core.Any, @core.Any] = @hono.Hono::new()
app.get("/", fn(c) { c.text("Hello, Hono!") }) |> ignore
}
Zod Example
// moon.pkg.json: import mizchi/npm_typed/zod
fn main {
let user_schema = @zod.object({
"name": @zod.string(),
"age": @zod.number().int(),
})
let data = @core.new_object()
data["name"] = @core.any("Alice")
data["age"] = @core.any(30)
match user_schema.safeParse(data) {
Ok(_) => println("Valid!")
Err(_) => println("Invalid!")
}
}
Requirements
This package requires:
- MoonBit nightly
2025-12-09or later for ESM#moduledirective support mizchi/jsv0.9.0 or later as a peer dependency
Related Projects
- mizchi/js - Core JavaScript FFI bindings
- @mizchi/cloudflare-mbt - Cloudflare Workers bindings
LICENSE
MIT
