Skip to content

Export the utils prop types #947 left out - #950

Open
acasazza wants to merge 1 commit into
mainfrom
fix/export-remaining-v4-utils-types
Open

acasazza wants to merge 1 commit into
mainfrom
fix/export-remaining-v4-utils-types

Conversation

@acasazza

Copy link
Copy Markdown
Member

What

Follow-up to #947. v4 exposed every type in components/utils through ./component_utils/*. #947 restored CustomerCardsTemplateChildren (PaymentSource), but these types used by public props are still unreachable in v5:

  • AddressCardsTemplateChildren: children-as-function of <Address>, the twin of CustomerCardsTemplateChildren
  • BaseFieldProps: props of OrderNumber
  • TGenericChildrenProps + TResources: children-as-function of LineItemField, SkuField, CustomerField, ParcelField, ParcelLineItemField and StockTransferField. TResources is needed to write the generic argument (TGenericChildrenProps<TResources["LineItem"]>)

Spec comment

public-api.spec.ts checks runtime exports only and skips components/utils, so it cannot catch any of these. Its comment now says so, and points at the hand-written list in src/index.ts.

Verification

  • pnpm typecheck clean
  • pnpm build: all four names are in the export {} of dist/index.d.ts
  • Full suite via pre-commit: 1364/1364

🤖 Generated with Claude Code

v4 exposed every type in components/utils through ./component_utils/*.
#947 restored CustomerCardsTemplateChildren for PaymentSource but not
its twin AddressCardsTemplateChildren for Address, nor BaseFieldProps
(OrderNumber) and TGenericChildrenProps (the *Field components), which
needs TResources to be usable.

The public-api spec cannot catch these: it checks runtime exports only
and skips components/utils. Say so in its comment.
@acasazza acasazza added bug Something isn't working components Components package labels Nov 20, 2026
@acasazza acasazza self-assigned this Nov 20, 2026
@netlify

netlify Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for commercelayer-react-components ready!

Name Link
🔨 Latest commit d5d9d39
🔍 Latest deploy log https://app.netlify.com/projects/commercelayer-react-components/deploys/6b0091f8cdbe2777b9e0c927
😎 Deploy Preview https://deploy-preview-950--commercelayer-react-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

This branch has not been deployed

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

Labels

bug Something isn't working components Components package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant