-
-
Notifications
You must be signed in to change notification settings - Fork 821
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
feat: improve error code type #489
Conversation
🦋 Changeset detectedLatest commit: 86afe6e The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Size Change: 0 B Total Size: 252 kB ℹ️ View Unchanged
|
Codecov Report
@@ Coverage Diff @@
## main #489 +/- ##
=======================================
Coverage 99.92% 99.92%
=======================================
Files 259 259
Lines 23972 23978 +6
Branches 1982 1981 -1
=======================================
+ Hits 23955 23961 +6
Misses 17 17
|
export class RpcError extends Error { | ||
code: number | ||
code: RpcErrorCode | (number & {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adds loose autocomplete. Could lock down completely though.
PR-Codex overview
This PR improves the
RpcError
code types in theeip1193
module.Detailed summary
RpcErrorCode
typeRpcError
constructor to acceptRpcErrorCode
type for code parameter