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

[bpk-component-phone-input] Migrate to TypeScript #4747

Closed

Description

Context

bpk-component-phone-input is partially migrated — it has 2 TSX files but the main component is still JS.

Files to migrate (1)

File Type
src/BpkPhoneInput.js Main component — uses prop-types (including wrapperProps: PropTypes.object)

Migration guidance

  1. Rename BpkPhoneInput.js → BpkPhoneInput.tsx.
  2. Replace prop-types import with a TypeScript interface for the component props. Replace wrapperProps: PropTypes.object with a properly typed interface (e.g. wrapperProps?: React.HTMLAttributes<HTMLDivElement>).
  3. Migrate defaultProps to ES6 destructure defaults.
  4. Update test files — there are 3 test files (BpkPhoneInput-test.js, form-test.js, accessibility-test.js) that use a shared defaultProps const. Convert these to .test.tsx / .tsx and type the shared props object.
  5. Update Storybook stories (.stories.js → .stories.tsx).
  6. Update index.js → index.ts and package entry points.
  7. Run npm run lint, npm run typecheck, and npm test.

References

Activity

  1. gert-janvercauteren commented on Jul 3, 2026

    @gert-janvercauteren
    ContributorAuthor

    This was generated by AI during triage.

    Triaged as enhancement / ready-for-agent. The issue is fully specified with clear file-by-file migration guidance — an AFK agent can complete this without human context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions