Skip to content
This repository was archived by the owner on Aug 5, 2026. It is now read-only.

[bpk-component-modal] Migrate customPropTypes to TypeScript - #4763

Merged
GC Zhu (gc-skyscanner) merged 9 commits into
mainfrom
ts-migration/bpk-component-modal
Jul 16, 2026
Merged

GC Zhu (gc-skyscanner) merged 9 commits into
mainfrom
ts-migration/bpk-component-modal

Conversation

@gert-janvercauteren

Copy link
Copy Markdown
Contributor

Summary

  • Migrates bpk-component-modal from JavaScript to TypeScript
  • Replaces prop-types with TypeScript interfaces
  • Converts defaultProps to ES6 destructure defaults
  • Removes Flow type annotations
  • Renames .js source/test/story files to .tsx/.ts

Closes #4750

Migrates bpk-component-modal from JavaScript to TypeScript as described in #4750.

- Replaced prop-types with TypeScript interfaces
- Converted defaultProps to ES6 destructure defaults
- Renamed .js source/test/story files to .tsx/.ts
- Removed Flow type annotations
- Preserved Apache 2.0 license headers

Closes #4750
Copilot AI review requested due to automatic review settings June 26, 2026 09:24
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

@skyscanner-backpack-bot

skyscanner-backpack-bot Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor
Warnings
⚠️

Package source files (e.g. packages/package-name/src/Component.js) were updated, but snapshots weren't. Have you checked that the tests still pass?

Browser support

If this is a visual change, make sure you've tested it in multiple browsers.

Generated by 🚫 dangerJS against 4c66fd4

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.

Migrates bpk-component-modal away from Flow/prop-types toward TypeScript-based typing, aligning modal prop validation with the TS codebase.

Changes:

  • Replaces Flow annotations with TypeScript type definitions for custom validators.
  • Introduces ValidatorProps/Validator types and applies them to titlePropType and onClosePropType.

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

@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

…suppressions.md

Replace @ts-ignore with @ts-expect-error for untyped imports.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

…x.ts

Must precede the 'from' clause to suppress the module-level import error.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

Rename customPropTypes-test.js → customPropTypes-test.ts and remove
the Flow annotation, completing the TS migration for this file.
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

gc-skyscanner

This comment was marked as outdated.

@gc-skyscanner
GC Zhu (gc-skyscanner) merged commit 5ba5ee1 into main Jul 16, 2026
15 checks passed
@gc-skyscanner
GC Zhu (gc-skyscanner) deleted the ts-migration/bpk-component-modal branch July 16, 2026 05:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

minor Non breaking change ts-conversion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bpk-component-modal] Migrate customPropTypes to TypeScript

3 participants