Skip to content

Improve return type of toHex#1195

Merged
Gudahtt merged 1 commit intomainfrom
improve-to-hex-return-type
Apr 17, 2023
Merged

Improve return type of toHex#1195
Gudahtt merged 1 commit intomainfrom
improve-to-hex-return-type

Conversation

@Gudahtt
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt commented Apr 17, 2023

Description

The toHex utility function now returns the Hex type rather than a string. The Hex type is a string that is guaranteed to start with 0x.

This is a type-only change, there no no functional changes.

Changes

  • CHANGED: The toHex function now returns the type Hex, which guarantees that the returned string starts with 0x.

References

This was extracted from #1116, which addresses #970

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation for new or updated code as appropriate (note: this will usually be JSDoc)
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

The `toHex` utility function now returns the `Hex` type rather than a
`string`. The `Hex` type is a string that is guaranteed to start with
`0x`.

This is a type-only change, there no no functional changes.
@Gudahtt Gudahtt marked this pull request as ready for review April 17, 2023 14:33
@Gudahtt Gudahtt requested a review from a team as a code owner April 17, 2023 14:33
@Gudahtt Gudahtt merged commit d131343 into main Apr 17, 2023
@Gudahtt Gudahtt deleted the improve-to-hex-return-type branch April 17, 2023 15:46
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.

3 participants