Bump typescript-go submodule past microsoft/typescript-go#4913 (false TS2321 poisons later assignability checks)

#77 · closed · 0 comments

View on GitHub ↗

DrJKL

The bridge's `typescript-go` submodule points at `2bd066d` (2026-07-08, the 7.0.2 release line). That predates microsoft/typescript-go#4913 (merged 2026-08-18, "Improve recursion identities and `isDeeplyNestedType`", fixes microsoft/typescript-go#4807), which stopped the checker from emitting TS2321 at the 100-level relation limit. Without it, one deep comparison overflows, TS2321 is reported, and the failed sub-relations stay cached, so later unrelated assignments fail too. We hit this in Comfy-Org/ComfyUI_frontend through `vue-tsc` + `typescript-native-bridge`. The trigger is `@total-typescript/shoehorn`'s `PartialDeep` applied to a large class (`LGraphNode`, ~285 members): ``` src/utils/__tests__/litegraphTestUtils.ts(88,10): error TS2321: Excessive stack depth comparing types '{ constructor?: ...; ... 283 more ...; }' and 'PartialDeepObject<LGraphNode>'. src/components/graph/DomWidgets.test.ts(45,5): error TS2322: Type 'LGraphNode' is not assignable to type 'PartialDeepObject<LGraphNode>'. ... error TS2345: Argument of type 'HTMLCanvasElement' is not assignable to parameter of type 'PartialDeepObject<HTMLCanvasElement>'. ``` The `HTMLCanvasElement` failure is pure lib.dom and passes in isolation. In a two-statement probe, `fromPartial<LGraphNode>(node); fromPartial<HTMLCanvasElement>(canvas)` produces both errors, and swapping the two lines produces none, which is the cache-poisoning shape #4913 addresses. ## Results on the same program | compiler | PartialDeep diagnostics | | --- | --- | | `[email protected]` (`lib/tsc.js`) | 61 in 25 files, 3 of them TS2321 | | `[email protected]` (`bin/tsc`) | same | | `[email protected]` | 0 (also with `--stableTypeOrdering`) | | `[email protected]` | 0 | All other diagnostics are identical between 6.0.3, 7.1 nightly, and the bridge (the residue is `.vue` import TS2307s from running plain tsc on this program). ## Repro ```sh git clone https://github.com/Comfy-Org/ComfyUI_frontend && cd ComfyUI_frontend # f288d755 pnpm install && pnpm add -D typescript-native-bridge cat > repro.tsconfig.json <<'EOF' { "extends": "./tsconfig.json", "compilerOptions": { "incremental": false, "tsBuildInfoFile": null }, "include": ["src/**/*.ts", "global.d.ts"] } EOF node node_modules/typescript-native-bridge/lib/tsc.js -p repro.tsconfig.json | grep -E 'TS2321|PartialDeep' | wc -l # 61 pnpm dlx --package typescript@next tsc -p repro.tsconfig.json | grep -E 'TS2321|PartialDeep' | wc -l # 0 ``` ## Ask Rebase the submodule onto a typescript-go commit that includes #4913 (anything on `main` after 2026-08-18; the 7.1 nightlies carry it) and cut a release. Per #50 that would be the base bump that resets the bridge counter. We are carrying a pnpm patch on shoehorn in the meantime and would drop it as soon as a bumped bridge ships. Happy to test a prerelease against this repo.

Comments