Skip to content

chore: bump prototype tsconfig target and lib to ES2022#124

Merged
singyichen merged 1 commit into
mainfrom
chore/prototype-tsconfig-es2022
Jul 22, 2026
Merged

chore: bump prototype tsconfig target and lib to ES2022#124
singyichen merged 1 commit into
mainfrom
chore/prototype-tsconfig-es2022

Conversation

@singyichen

Copy link
Copy Markdown
Owner

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.json pinned target/lib to ES2020. On PR #122 this produced a false negative: Object.hasOwn ran 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.json target and lib bumped ES2020 → ES2022 (DOM lib and all other options unchanged). ES2022 APIs such as Object.hasOwn and Array.prototype.at are now accepted by tsc, matching what the runtime already executes.

Changed Files

File Change
design/prototype/tsconfig.json target/lib ES2020 → ES2022

Test Plan

  • npx tsc --noEmit in design/prototype/ — passes on the existing suite
  • No source changes — Playwright behavior unaffected (config only widens accepted syntax)

Notes

Config-only change; no API contracts, no version numbers touched.

Impact Scope

  • Frontend
  • Admin
  • API
  • Queue
  • Other: design prototype tooling config

Related

#122 (incident that motivated this)

🤖 Generated with Claude Code

- **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>
@singyichen singyichen added the task 任務追蹤 — Trackable tasks and to-dos label Jul 22, 2026
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@singyichen
singyichen merged commit 6f9a6ab into main Jul 22, 2026
10 checks passed
@singyichen
singyichen deleted the chore/prototype-tsconfig-es2022 branch July 22, 2026 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

task 任務追蹤 — Trackable tasks and to-dos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant