ethereum-block-by-date
ethereum-block-by-date copied to clipboard
Bug in DefinitelyTyped definitions
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!

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?