chore: bump prototype tsconfig target and lib to ES2022#124
Conversation
- **Bump** target/lib from ES2020 to ES2022 because prototype tests execute in Chromium and current Node, which both support ES2022; the stale lib rejected Object.hasOwn on PR #122 (TS2550) even though the code ran fine at runtime - **Keep** module/types/strict settings unchanged; tsc passes on the existing test suite with the new lib Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
Review Summary
This configuration change correctly aligns the TypeScript compiler settings with the ES2022 runtime environment. The update resolves the false negative from PR #122 where ES2022 APIs were rejected by tsc despite being supported at runtime.
Changes Verified:
- ✅ TypeScript target and lib upgraded from ES2020 to ES2022
- ✅ Change is scoped to prototype tooling only
- ✅ No source code modifications required
- ✅ Resolves compiler/runtime divergence
No blocking issues found. The change is ready to merge.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
Purpose
Align the prototype TypeScript config with the actual runtime environment so tsc stops rejecting APIs the runtime supports.
Reason
Prototype Playwright tests execute in Chromium and current Node — both support ES2022 — but
tsconfig.jsonpinnedtarget/libto ES2020. On PR #122 this produced a false negative:Object.hasOwnran fine at runtime yet failed the "Prototype — Type Check (tsc)" CI job with TS2550. A stale compiler lib protects nothing here; it only creates runtime/typecheck divergence.Result
design/prototype/tsconfig.jsontargetandlibbumpedES2020 → ES2022(DOM lib and all other options unchanged). ES2022 APIs such asObject.hasOwnandArray.prototype.atare now accepted by tsc, matching what the runtime already executes.Changed Files
design/prototype/tsconfig.jsontarget/libES2020 → ES2022Test Plan
npx tsc --noEmitindesign/prototype/— passes on the existing suiteNotes
Config-only change; no API contracts, no version numbers touched.
Impact Scope
Related
#122 (incident that motivated this)
🤖 Generated with Claude Code