# TypeScript and WebAssembly integration notes

The comprehensive TypeScript cookbook is generated from the shared site:

- [start and package setup](../../website/docs/getting-started.mdx);
- [all operation families](../../website/docs/reference.mdx); and
- public site: <https://softchat-sdk.jackl.dev/?lang=typescript>.

Import the authored package root. Browser and Worker consumers initialize
`@softcose/softchat/browser` explicitly; raw Wasm files are exposed only for
asset resolution. Calls after initialization are synchronous, so move large
operations into a Worker. Keep WebSocket, `fetch`, IndexedDB, service-worker
lifecycle, files, and redirect policy in JavaScript.

Verify CommonJS, Node ESM, browser, Worker, and the packed artifact with:

```sh
bash scripts/test-javascript-package.sh
just javascript-docs
```

Exact signatures are in TypeDoc. The frozen Wasm comparison and copy/allocation
guidance remain in [the TypeScript audit](../performance/typescript.md).
