Latest Results
fix(monty-js): publish the component facade declaration in dist
The published `dist/worker/component/monty.component.d.ts` was Jco's own
generated declaration, which declares only `ImportObject`, `Root` and
`instantiate`. The facade that `scripts/build-component.mjs` builds — the
one that re-exports the WIT types via
`export * from './interfaces/pydantic-monty-worker.js'` — was only written
into the TypeScript source tree, never into `dist`.
So `dist/worker/host.d.ts` and `dist/worker/transport.d.ts`, which import
`DispatchResult`, `Request` and `ConfigureRequest` from
`./component/monty.component.js`, ship dangling imports, and a strict
consumer that only does `import { Monty } from '@pydantic/monty/wasm'`
fails to compile with three TS2305 errors.
`build-component.mjs` now writes the facade into `dist` too (in place of
Jco's version, which nothing imports) and keeps both copies identical.
`make check-wasm-types` gains `npm run check:dist-types`, a
`skipLibCheck: false` pass over the built `dist/worker/index.d.ts`. The
package's own `tsconfig.json` compiles from `ts`, so it never saw this;
against the published 1.1.0 declarations the new check reports the three
TS2305 errors, and against a `dist` built with this change it is clean.
Refs #982Yi-111-a:fix/wasm-declaration-exports Latest Branches
0%
Yi-111-a:fix/wasm-declaration-exports 0%
0%
© 2026 CodSpeed Technology