Keep runtime HMR type copies, point them at the generated source of truth
Follow-up to the ts-rs HMR codegen: rather than restructure the browser runtime
(which models these wire types as self-tagged with branded keys and has ~250
lines of merge logic depending on that shape), keep the turbopack runtime's
ambient copies and document them as mirrors of the Rust source of truth.
- Restore `nodejs/hmr-types.d.ts` and `nodejs/dev/hmr-client.ts` to their
original state (an earlier edit had deleted the ambient file, which is the sole
input of `check:nodejs`).
- Replace the stale "duplicate of types.ts / keep in sync" comment on
`hmr-types.d.ts` and add a "source of truth" comment to `dev-protocol.d.ts`,
both pointing at `turbopack-ecmascript`'s `chunk_list` structs and the generated
`packages/next/src/build/swc/generated-hmr-types.ts`.
<!-- NEXT_JS_LLM -->
Co-authored-by:
Will Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
Showing
Please
register
or
sign in
to comment