monosux/ethereum-block-by-date

Bug in DefinitelyTyped definitions

Closed this issue · 3 comments

None of the method return values are wrapped with Promise<...>, so my IDE yells at me that I'm using await unnecessarily.

Could you please provide some code example?

I'm getting this too!

screenshot-QrWZSJM2

Looks like the DefinitelyTyped typings sets the return type to EthDater.BlockResult, when it should be Promise<EthDater.BlockResult>.

This change in DefinitelyTyped should do it:

- getDate(date: MomentInput, after?: boolean, refresh?: boolean): EthDater.BlockResult;
+ getDate(date: MomentInput, after?: boolean, refresh?: boolean): Promise<EthDater.BlockResult>;

Hi @larskarbo,

Thank you! Could you please submit needed changes to DefinitelyTyped?