-
-
Notifications
You must be signed in to change notification settings - Fork 10
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(types): Optional JSON params where undefined is not valid #134
fix(types): Optional JSON params where undefined is not valid #134
Conversation
Full diff of resulting built package and typings compared to CJS
ESM
Typings
|
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.
I am a bit worried that this will cause repercussions that we might not have accounted for yet. We should see if we can test these changes in core
, Snaps, and perhaps even other libraries like json-rpc-engine
or eth-json-rpc-middleware
first. I don't know if I will have time to look into this right now, just want to advise that we might want to tread carefully here.
@mcmire I've patched in the built version of this PR in packages you mentioned here:
|
Ah nice, thank you. I see CI passes in each case (i.e. no type errors). That's a good sign at least! |
@mcmire Updated above comment with |
Follow-up to #130 (#129).
This should now:
undefined
as valid JSON value in typesparams
field optional in typesThe hardcoded types were extracted from the resulting
json.d.ts
after a build ofv8.0.0
(currentmain
), with the only change in thatparams:
was changed intoparams?:
. This seems to be necessary due to the waysuperstruct
omit
andoptional
work.