[bpk-component-ticket] Migrate to TypeScript#4759
[bpk-component-ticket] Migrate to TypeScript#4759Gert-Jan Vercauteren (gert-janvercauteren) merged 7 commits into
Conversation
Migrates bpk-component-ticket from JavaScript to TypeScript as described in #4746. - 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 #4746
There was a problem hiding this comment.
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-ticket away from Flow/PropTypes toward TypeScript-style typing while modernizing default props handling.
Changes:
- Removes Flow and
prop-typesusage frombpk-component-ticket. - Introduces TypeScript type definitions for component/stories props.
- Replaces
defaultPropspatterns with parameter destructuring defaults.
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/backpack-web/src/bpk-component-ticket/src/BpkTicket.stories.js | Removes prop-types and adds TypeScript-style prop typing in stories. |
| packages/backpack-web/src/bpk-component-ticket/src/BpkTicket.js | Replaces Flow/PropTypes with TypeScript types and destructured defaults; updates spread typing. |
| packages/backpack-web/src/bpk-component-ticket/index.js | Removes Flow header comment; keeps export wiring. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Visit https://backpack.github.io/storybook-prs/4759 to see this build running in a browser. |
…pshots, delete old .js files
|
Visit https://backpack.github.io/storybook-prs/4759 to see this build running in a browser. |
|
Visit https://backpack.github.io/storybook-prs/4759 to see this build running in a browser. |
…-suppressions.md Replace @ts-ignore with @ts-expect-error for untyped imports. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
Visit https://backpack.github.io/storybook-prs/4759 to see this build running in a browser. |
…ex.ts Must precede the 'from' clause to suppress the module-level import error. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
Visit https://backpack.github.io/storybook-prs/4759 to see this build running in a browser. |
dcef62d
into
main
Summary
bpk-component-ticketfrom JavaScript to TypeScriptprop-typeswith TypeScript interfacesdefaultPropsto ES6 destructure defaults.jssource/test/story files to.tsx/.tsCloses #4746