Skip to content

Commit

Permalink
Explain type
Browse files Browse the repository at this point in the history
  • Loading branch information
twschiller committed Jul 8, 2024
1 parent 38e6c11 commit b07043b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/PackageIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ type PackageIconProps<T extends Metadata | PackageInstance> = {
* @see Metadata
* @see PackageInstance
*/
// As of 2.0.5, the Metadata and PackageInstance types are currently equivalent. But include both in the union to make
// the type signature more explicit.
const PackageIcon = <T extends Metadata | PackageInstance>({
packageOrMetadata,
size,
Expand Down

0 comments on commit b07043b

Please sign in to comment.