Bug in DefinitelyTyped definitions
Closed this issue · 3 comments
supafreq commented
None of the method return values are wrapped with Promise<...>
, so my IDE yells at me that I'm using await
unnecessarily.
monosux commented
Could you please provide some code example?
larskarbo commented
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>;
monosux commented
Hi @larskarbo,
Thank you! Could you please submit needed changes to DefinitelyTyped?