build(fathom-ts): add DOM to tsconfig lib for TypeScript 6 compat#92
Merged
Conversation
TypeScript 6 no longer exposes the web globals (fetch, Response, Blob, FormData, Headers, RequestInit, AbortController, console, btoa) through @types/node's ambient shims when only the ES2020 lib is configured. The generated @hey-api client and hand-written client.ts reference these standard fetch/web APIs, so tsc and typedoc fail with 23 TS2304/TS2584 errors under TS 6. Adding the DOM lib restores those globals from their canonical source. The change is type-check-only (target/module unchanged, so emitted JS is identical) and conflict-free with @types/node thanks to skipLibCheck. Unblocks the typescript 5.9.3 -> 6.0.3 Dependabot bump (#60), which fails both ts-ci and the Python TS-SDK-docs test that shells out to typedoc. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YFbDHuyErPiiWNEGkEa4kG
krakennetworks
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
TypeScript 6 stops exposing the web/fetch globals (
fetch,Response,Blob,FormData,Headers,RequestInit,AbortController,console,btoa) through@types/node's ambient shims when only theES2020lib is configured. The generated@hey-apiclient and hand-writtensrc/client.tsuse those standard APIs, sotscandtypedocemit 23TS2304/TS2584errors under TS 6.This blocks the
typescript 5.9.3 → 6.0.3Dependabot bump (#60), failing bothts-ciand the Pythontest_ts_sdk_docs.pytest (which shells out totypedoc).Fix
Add the
DOMlib topackages/fathom-ts/tsconfig.json, restoring those globals from their canonical source.Why it's safe
libaffects type-checking only;target/moduleunchanged, sodist/output is byte-identical.@types/nodeboth declare these globals, butskipLibCheck: true(already set) suppresses the duplicate-identifier clash. Verified 0 errors on TS 5.9.3 and 6.0.3.fetch/Response/Headers/Blob.Verification
lib: ["ES2020"](current)lib: ["ES2020","DOM"](this PR)Once merged, Dependabot will rebase #60 onto main and it goes green.
🤖 Generated with Claude Code