Skip to main content
TypeScript uses the same ComponentizeJS toolchain as JavaScript, with one extra stage: tsc compiles to JavaScript first, then jco componentizes the output.

Prerequisites

  • Node.js 18 or newer, with npm.
  • The Noorle CLI.
  • The shared WebAssembly tools, installed once with noorle plugin prepare.

Layout

The interface

The implementation

Export a function per WIT export, camelCased.

WASI type declarations

WASI imports have no bundled types, so the project carries a hand-written wasi.d.ts declaring the interfaces it uses. Add a declaration for each new WASI import you take on.

tsconfig.json

The settings that matter for componentization:
types and typeRoots are deliberately empty — pulling in Node’s ambient types would suggest APIs the component does not have.

noorle.yaml

Same shape in every language. Full key-by-key reference: noorle.yaml.

Build

That runs the project’s build.sh: type-check, compile, then componentize the compiled JavaScript.
Note the componentizer’s input is dist/app.js, not app.ts.

Test locally

Deploy

Next