Repository navigation
Description
npm run build in sdks/javascript fails with 48 tsc errors. Verified by copying package.json, tsconfig.json and src/ to a scratch directory, npm install, npx tsc --noEmit.
Two of the 48 are not strictness nits — they are references to things that do not exist:
src/types.ts:308—config?: Configuration | ...inClientOptions. There is noConfigurationtype anywhere insrc/. The only near match isConfigurationPreset(types.ts:316).error TS2304: Cannot find name 'Configuration'.src/index.ts:32—export { StorageAdapter } from './storage'.storage.tsexportsS3StorageAdapterand nothing namedStorageAdapter.error TS2724.
Both date to bf9c916 ("feat: Complete language-specific SDK development", 2025-08-18), the commit that added the SDK. So the published main field points at dist/index.js, and dist/ has never been producible from this source.
The remaining 46 are real too, mostly exactOptionalPropertyTypes: true and noUncheckedIndexedAccess: true violations the tsconfig turns on and the source does not honour: 11×TS2739 and 5×TS2741 (missing required properties, all in config.ts's preset objects), 9×TS2322, 6×TS18048 ('result' is possibly 'undefined' in monitoring.ts), plus mount.ts:68,76 Property 'on' does not exist on type 'never' — the ChildProcess overload intersection reduced to never.
Why CI is green
Nothing in CI or the Makefile runs tsc:
$ grep -rn 'npm run build\|npm run docs\|tsc' .github/workflows/ Makefile
.github/workflows/ci.yml:304: # tsconfig.json excludes **/*.test.ts from the build.
sdk-metrics (ci.yml:299-306) runs npm install && npm test. npm test is jest, and ts-jest typechecks only the files the suite pulls in — prometheus.test.ts and prometheus.ts. prometheus.ts happens to be clean. Every other file in the SDK is unchecked by anything.
Related: the TypeScript version is silently pinned three minors back
devDependencies says typescript: ^5.0.0, but the resolved compiler is 5.1.6, because typedoc@^0.24.0 declares peer typescript@"4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x". The SDK is being compiled by a 2023 compiler while the manifest suggests current 5.x.
This is also the third package in the peer-coupled set from #306, which was missed there. Grouping typescript+ts-jest+jest+@types/jest is not sufficient — typedoc gates the same range. Verified resolution ceiling today:
| package | latest | peer range on typescript |
|---|---|---|
ts-jest |
29.4.12 | >=4.3 <7 |
typedoc |
0.28.20 | 5.0.x ... 5.9.x || 6.0.x |
So TypeScript 7 is not installable here at any grouping — #308's typescript@^7.0.2 fails npm install even with jest/@types/jest moved to 30, because ts-jest has no <8 release. The reachable target is TypeScript 6, with typedoc bumped ^0.24.0 → ^0.28.20. Verified: that four-package set resolves cleanly (npm install --dry-run clean).
TypeScript 6 then adds one more error on top of the 48: tsconfig.json:15 moduleResolution: "node" is error TS5107 — deprecated, removed in 7.0, needs "ignoreDeprecations": "6.0" or a move to node16/nodenext. Switching to node16 does not reduce the other 48.
Proposed order
- Fix the two nonexistent-identifier errors (
Configuration,StorageAdapter) — these are wrong regardless of compiler version. - Fix or explicitly relax the strictness errors.
exactOptionalPropertyTypesandnoUncheckedIndexedAccessare good settings; the honest options are to satisfy them or to turn them off, not to leave them on and unenforced. - Add
npm run buildto thesdk-metricsjob, so this cannot regress silently. Without this step the other two fixes have no guard. - Only then bump the toolchain:
typescript ^6,typedoc ^0.28,jest ^30,@types/jest ^30, andmoduleResolution. - Add
typedocto thetypescript-toolchaingroup in.github/dependabot.yml, and close deps(deps-dev): bump the typescript-toolchain group in /sdks/javascript with 3 updates #308 as unresolvable at TypeScript 7.
Filed while investigating #308's ERESOLVE; the install failure is real but it was masking a larger one.
Activity
fix(ci): add typedoc to the typescript-toolchain group
fix(ci): typedoc in the toolchain group, PR limits that were hiding w…
scttfrdmn commentedon Aug 3, 2026
A fourth never-run target in this same SDK, found while evaluating #309 (the typescript-eslint group bump):
npm run linthas never worked either, and for a reason independent of the 48tscerrors.package.json:96-116carries aneslintConfigblock whoseextendsreads:The correct name is
plugin:@typescript-eslint/recommended. Without theplugin:prefix eslint resolves it as a shareable-config package, doesn't find one, and refuses to run at all. Verified against the currently pinned versions — a clean install ofsdks/javascriptat[email protected]and@typescript-eslint/*@5.62.0, i.e. exactly whatmaindeclares today:"prettier"in the same list is likely wrong too — that resolves toeslint-config-prettier, which is declared, so it may be fine, but nothing has ever exercised it to find out.Same root cause as this issue: nothing in CI runs
npm run lint.grep -rn "npm run lint\|eslint" .github/workflows/returns zero hits. Thesdk-metricsjob runsnpm install && npm testonly, so a lint script that cannot start looks identical to one that passes.This matters for the fix order here. Step 3 of the plan above adds
npm run buildtosdk-metrics;npm run lintshould go in the same commit, because otherwise the next person to add it discovers this separately. And it changes how #309 should be read: that PR bumps eslint 8 → 10, and eslint 9 removed.eslintrc-style config entirely in favour of flateslint.config.js. So #309 needs a config rewrite — but it is not a regression, because there is no working lint today to regress. Whoever does step 3 should write the flat config once, at eslint 10, rather than fixing theplugin:prefix in a format that is already two majors obsolete.docs(dependabot): correct two claims this PR made false, and record t…
scttfrdmn commentedon Aug 3, 2026
Closed, but two of its five proposed steps were not in the closing work, and with the issue closed they were tracked nowhere:
Step 4, the toolchain bump (
typescript ^6,typedoc ^0.28,jest ^30,moduleResolution) → now Bump the JavaScript SDK to TypeScript 6: two tsconfig keys, and the TS5107 that hides 63 errors behind 1 #328, with the recipe measured rather than predicted. The short version: with this issue's 48 source errors fixed in fix(sdks): all four SDKs compile, are gated in CI, and stop reporting work they never did #327, TypeScript 6 needs exactly twotsconfig.jsonkeys —"ignoreDeprecations": "6.0"and"types": ["node"], the latter because 6.0 stopped auto-including@types/node. Verified 0 errors, 65 passing tests,dist/emitted.One trap worth knowing before anyone attempts it: the
TS5107onmoduleResolution: "node"is a config-level error, sotscexits before typechecking any source and reports 1 error while 63 wait behind it. Fixing the deprecation alone therefore looks like a 63-error regression when it is actually the first honest measurement.Step 5, adding
typedocto thetypescript-toolchainDependabot group and closing deps(deps-dev): bump the typescript-toolchain group in /sdks/javascript with 3 updates #308 as unresolvable at TypeScript 7, is done — the group at.github/dependabot.ymlincludes it and deps(deps-dev): bump the typescript-toolchain group in /sdks/javascript with 3 updates #308 is closed. Confirmed against the committedpackage-lock.json:typescript: ^5.0.0resolves to 5.1.6, held back by[email protected], exactly as this issue predicted.Steps 1-3 landed in #327, which also closes the CI gap this issue identified:
npm run buildandnpm run lintnow run as their own steps, so a bump that breaks compilation fails the PR instead of merging green. The same gap was then found and closed in the Python, Java and C SDKs by going looking for it.fix(sdks): all four SDKs compile, are gated in CI, and stop reporting…