You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: export synthetic and change event types - #180
Typed handlers that import ChangeEvent or SyntheticEvent from React fail to compile when React resolves to Redact. Export BaseSyntheticEvent, SyntheticEvent and ChangeEvent from the React entry so input and select handlers can name their event types.
This adds declarations and a patch changeset. It does not change event dispatch.
Validation on main f61f721 with Node 24.22.0:
All 2,127 tests passed, with 91 skipped, and project types and build verification passed.
All 38 fixed size checks passed. All 36 React 18/19 compatibility comparisons were zero bytes for minified, gzip and Brotli.
A consumer of the actual packed package compiled all three exported types with strict checks. Removing the exports from the packed declaration made that consumer fail.
Reviewed the complete four-file diff. No dependencies, scripts or workflows changed.
Summary by CodeRabbit
New Features
Added exported TypeScript types for base synthetic events, synthetic events, and change events in React integrations. These types help provide event-aware typing for handlers, including access to input values and checked state, select options, event targets, and common event methods.
No actionable comments were generated in the recent review.
Walkthrough
The package adds exported TypeScript interfaces for base synthetic events, synthetic events, and change events. Type examples cover input and select targets, and a changeset declares a patch release.
Changes: React change-event types
Layer / File(s)
Summary
Define and expose event types packages/redact/src/react/events.ts, packages/redact/src/react/index.ts, tests/types/change-events.ts, .changeset/change-event-types.md
The new interfaces define event properties, methods, and target types. The React entry point exports the types. Examples check input and select event members and target-specific typing. The changeset declares a patch release.
This adds TypeScript event type exports for typed handlers without changing runtime behavior. No merge-blocking risk is evident.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "fix: export synthetic and change event types" matches the main change. The PR adds exported BaseSyntheticEvent, SyntheticEvent, and ChangeEvent interfaces in packages/redact/src/react/event…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "fix: export synthetic and change event types" matches the main change. The PR adds exported BaseSyntheticEvent, SyntheticEvent, and ChangeEvent interfaces in packages/redact/src/react/events.ts, re-exports them from packages/redact/src/react/index.ts, and adds a patch changeset and type tests. The title is short, specific, and does not describe unrelated work. The "fix:" prefix is a conventional-commit label; the change adds exports and does not alter event dispatch, which the title does not claim.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 6d27e53e-9bd9-46f7-8c32-c0d75c5add81
Commits
Reviewing files that changed from the base of the PR and between f61f721 and b3c0bb0.
Files selected for processing: 4
.changeset/change-event-types.md
packages/redact/src/react/events.ts
packages/redact/src/react/index.ts
tests/types/change-events.ts
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
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
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.
Typed handlers that import
ChangeEventorSyntheticEventfrom React fail to compile when React resolves to Redact. ExportBaseSyntheticEvent,SyntheticEventandChangeEventfrom the React entry so input and select handlers can name their event types.This adds declarations and a patch changeset. It does not change event dispatch.
Validation on main
f61f721with Node 24.22.0:Summary by CodeRabbit