Skip to content
This repository was archived by the owner on Nov 9, 2023. It is now read-only.

Conversation

@rekmarks
Copy link
Member

Adds some type guard utilities in a new file, utils.ts, and accompanying unit tests.

Closes #89

In addition to fixing #89, adds a function for validating JSON-RPC ID values. As part of implementing that, this also fixes a long-standing bug where we returned undefined instead of null for the ID when returning an error for a request without an id value.

@rekmarks rekmarks requested a review from a team as a code owner May 18, 2021 02:21
shanejonas
shanejonas previously approved these changes May 18, 2021
@rekmarks rekmarks merged commit 0e57ecd into main May 18, 2021
@rekmarks rekmarks deleted the add-utils branch May 18, 2021 17:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export type guard functions for response objects

3 participants