Skip to content

Re-enable exactOptionalPropertyTypes#1385

Merged
obiot merged 1 commit intomasterfrom
fix/exact-optional-property-types
Apr 14, 2026
Merged

Re-enable exactOptionalPropertyTypes#1385
obiot merged 1 commit intomasterfrom
fix/exact-optional-property-types

Conversation

@obiot
Copy link
Copy Markdown
Member

@obiot obiot commented Apr 14, 2026

Summary

  • Re-enable exactOptionalPropertyTypes: true in the shared tsconfig
  • Fix the single remaining error in gamepad.ts (ButtonBinding.threshold needed | undefined)
  • Upstream type issues in vite 8.0.8, vitest 4.1.4, and @types/node 25.6.0 are now resolved

Closes #1271

Test plan

  • Full build passes (all 5 turbo tasks including examples)
  • All 2388 tests pass
  • No type errors in melonJS source or third-party dependencies

🤖 Generated with Claude Code

Upstream type issues in vite, vitest, and @types/node are now resolved.
The only remaining error was in gamepad.ts where ButtonBinding.threshold
needed `| undefined` added to the optional property type.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 14, 2026 03:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Re-enables TypeScript’s exactOptionalPropertyTypes in the shared base tsconfig now that upstream dependency type issues are resolved, and adjusts the single in-repo type that required an update (gamepad.ts) to compile cleanly under the stricter optional-property semantics.

Changes:

  • Turn exactOptionalPropertyTypes: true back on in packages/tsconfig/base.json.
  • Update ButtonBinding.threshold typing in gamepad.ts to allow explicit undefined assignment under exactOptionalPropertyTypes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/tsconfig/base.json Re-enables exactOptionalPropertyTypes for all packages extending the shared config.
packages/melonjs/src/input/gamepad.ts Adjusts ButtonBinding.threshold type to remain assignable when threshold is explicitly set to undefined.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@obiot obiot merged commit 66e61bb into master Apr 14, 2026
10 checks passed
@obiot obiot deleted the fix/exact-optional-property-types branch April 14, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-enable exactOptionalPropertyTypes once third-party types are fixed

2 participants