-
Notifications
You must be signed in to change notification settings - Fork 36
Missing type exports: RLPInput, RLPDecoded #58
Comments
//cc @krzkaczor Can you have a look? |
Not sure, do we want to expose these? @webmaster128 TBH I find this use case not super convincing, do you really need a wrapper for this one extra call? |
@holgerd77 Yes I do in order to consistently use Uint8Array for my binary data. But the more interesting question is: should you export function without exporting its argument or return types? Looks like to is possible but this approach is not convincing in my eyes. |
By the way, unprefixing them would be nice to allow consistency when importing import * as rlp from "rlp";
// use rlp.encode, rlp.encode, rlp.Input, rlp.Decoded |
I'll wait for the answers from @krzkaczor, he is the |
I actually think it make sense what you propose on a second thought - also the unprefixing. If you would manage to do a short-term PR on this I would merge and can probably directly release tomorrow along a necessary bugfix release planned. |
I agree that exporting these types is a good idea @webmaster128 @holgerd77. Btw. It's great that we already have some typescript users ❤️ I think we should simply add |
Yeah, no problem. This is not urgent for me but I can have a look.
Sure :) Just upgraded 2.1 to 2.2 and am very happy to get rid of the safe-buffer type which I cannot directly convert to Uint8Array doe to missing interfaces. |
The types
RLPInput
,RLPDecoded
cannot be used in caller code because the index.d.ts does not export them.A workaround is
Having the types available is needed when you want to build a wrapper in TS like
The text was updated successfully, but these errors were encountered: