makerdao / multicall.js

Multicall.js: A JavaScript blockchain state management library for dapps
MIT License
421 stars 97 forks source link

Add declaration file to support TypeScript better #23

Closed chiro-hiro closed 3 years ago

chiro-hiro commented 4 years ago

It's a little bit hard to use this package in TypeScript. I hope, this pull request could make this package is more friendly with TypeScript developers.

levity commented 4 years ago

Thank you! This looks good. The only question I have is, why do all the types start with I? Is this a TypeScript convention I'm not aware of?

chiro-hiro commented 4 years ago

I is stand for interface, some other projects are also use this kind of naming. For example, you type I then the IDE could suggest all interfaces.

I've found it's convenience then I put it here.

chiro-hiro commented 3 years ago

@levity Hi, Are we have any update here?

levity commented 3 years ago

Hi @chiro-hiro, thanks for the reminder, I'll merge this now

levity commented 3 years ago

Published 0.12.0 to npm with this change

chiro-hiro commented 3 years ago

@levity If there are anything need to be changed, just let me know. I will keep one eye on it and update interfaces.

Thanks,

islishude commented 3 years ago

@levity Hi,the type files are ignored on npm,I just filed a pr to fix this #33