Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use Multiaddr as class name #352

Merged
merged 1 commit into from
Nov 6, 2023
Merged

Conversation

achingbrain
Copy link
Member

@achingbrain achingbrain commented Nov 4, 2023

Cosmetic change ahead.

When logging multaddrs in browsers DefaultMultiaddr appears in the console. It's called this to prevent a collision with the Multiaddr TypeScript interface name which is the horse leading the cart.

The interfaces are removed at compile time so here we import the interface with a different name, freeing up the Multiaddr symbol to be used as the class name which will now appear in the console.

This change is backwards compatible because everything is hidden behind the multiaddr factory function.

Cosmetic change ahead.

When logging multaddrs in browsers `DefaultMultiaddr` appears in
the console.

It's called this to prevent a collision with the `Multiaddr`
TypeScript interface name.

The interfaces are removed at compile time so here we import the
interface with a different name, freeing up the `Multiaddr` symbol
to be used as the class name.
@achingbrain achingbrain changed the title fix: use multiaddr as class name fix: use Multiaddr as class name Nov 4, 2023
@achingbrain achingbrain merged commit 35348cd into master Nov 6, 2023
18 checks passed
@achingbrain achingbrain deleted the fix/log-multiaddr-class branch November 6, 2023 07:39
github-actions bot pushed a commit that referenced this pull request Nov 6, 2023
## [12.1.9](v12.1.8...v12.1.9) (2023-11-06)

### Bug Fixes

* use Multiaddr as class name ([#352](#352)) ([35348cd](35348cd))
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.

1 participant