fix(types): Optional JSON params where undefined is not valid#134
fix(types): Optional JSON params where undefined is not valid#134legobeat merged 4 commits intoMetaMask:mainfrom
Conversation
|
Full diff of resulting built package and typings compared to CJSESMTypings |
mcmire
left a comment
There was a problem hiding this comment.
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:
undefinedas valid JSON value in typesparamsfield optional in typesThe hardcoded types were extracted from the resulting
json.d.tsafter a build ofv8.0.0(currentmain), with the only change in thatparams:was changed intoparams?:. This seems to be necessary due to the waysuperstructomitandoptionalwork.