Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.

Is the Dictionary type necessary? #62

Closed
s1na opened this issue Jan 2, 2019 · 2 comments
Closed

Is the Dictionary type necessary? #62

s1na opened this issue Jan 2, 2019 · 2 comments

Comments

@s1na
Copy link
Contributor

s1na commented Jan 2, 2019

The Input definition includes a Dictionary type, even though Dictionary doesn't seem to be used in the code and toBuffer doesn't explicitly handle it. The RLP reference hasn't mentioned anything about objects either. I was wondering if it can be removed, or there's a reason why it's there?

@alcuadrado
Copy link
Member

I think Dictionary is not only not needed, but incorrect. Calling encode({a: 1123}) throws invalid type.

I believe it was added in e81acfd9571 when trying to solve #35. TS support for recursive types is non-obvious, and while googling about it I got to this comment by Anders Hejlsberg
which looks almost the same as the original types.ts. This was probably copy-pasted and accidentally left here.

@s1na
Copy link
Contributor Author

s1na commented Apr 24, 2019

Fixed via #74

@s1na s1na closed this as completed Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants