Cap'n Proto schema compiler for TypeScript, version 0.7.0. Generates TypeScript type definitions and serialization code from .capnp schema files. Requires the capnp command-line tool (C++ reference implementation). Updated irregularly; key differentiator: enables type-safe Cap'n Proto usage in TypeScript without external RPC dependencies.
npm install capnpc-tsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Install capnpc-ts globally, compile a sample .capnp schema to TypeScript, and use the generated code.
Install capnp from https://capnproto.org/install.html or via package manager (e.g., brew install capnp on macOS).
Be aware that the output path includes the .capnp extension; adjust tsconfig.json if needed to include .ts files.
Use -o ts instead of -o capnpc-ts.
Install @capnp-ts/core as a runtime dependency: npm install @capnp-ts/core.
Ensure capnpc-ts is installed globally: npm install -g capnpc-ts. Verify plugin is accessible.
Use named import: import { MyStruct } from './my.capnp.ts';Install runtime dependency: npm install @capnp-ts/core (or capnp-ts for older versions).