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-writtenwasi.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
Build
build.sh: type-check, compile, then componentize the
compiled JavaScript.
dist/app.js, not app.ts.
Test locally
Deploy
Next
- JavaScript — the same toolchain without types
- noorle.yaml reference
- Permissions