Skip to content

Export Link type in Summary.tsx#429

Closed
pprev94 wants to merge 1 commit into
codegouvfr:mainfrom
pprev94:feat/add_link_type
Closed

Export Link type in Summary.tsx#429
pprev94 wants to merge 1 commit into
codegouvfr:mainfrom
pprev94:feat/add_link_type

Conversation

@pprev94

@pprev94 pprev94 commented Jun 12, 2025

Copy link
Copy Markdown
Contributor

For convenience, export the link type from Summary.tsx

@ddecrulle

ddecrulle commented Jun 12, 2025

Copy link
Copy Markdown
Collaborator

Hello,

There are several Link types in the library, so we can’t export the one from Summary as-is without risking naming conflicts. One option would be to use a namespace and expose it as SummaryProps.Link, but that feels a bit heavy for this use case. Alternatively, we could export the type under a different name, such as SummaryLink, if you prefer having a named type.

In the meantime, I recommend using SummaryProps["links"][number], which is simple and effective.

Let me know what you think!

@pprev94

pprev94 commented Jun 12, 2025

Copy link
Copy Markdown
Contributor Author

You're right, Link is a too common word and can be a source of conflicts.

Thanks

@ddecrulle ddecrulle closed this Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants