tfoxy / chrome-promise

Promises for chrome JavaScript APIs used in extensions and apps.
MIT License
150 stars 14 forks source link

Typescript definitions for chrome-promise #11

Closed ethanroday closed 7 years ago

ethanroday commented 7 years ago

Would be great to have Typescript type definitions available for this package. Could probably just use the @types/chrome definitions with minimal changes.

tfoxy commented 7 years ago

Will add them in the following days.

tfoxy commented 7 years ago

Hi. Sorry for the long delay. I've been using Typescript lately so now I'm more familiar with it.

What I'm trying to do now is to compile the declarations file from @types/chrome to an AST and then changing the declarations so that they use promises.

fedoranimus commented 7 years ago

Any updates on this?

tfoxy commented 7 years ago

I didn't have much time to work on side projects this year. But this week I'm moving closer to where I work. So I'm planning to catch up with all the things I've been postponing. And this is one of them. So expect a release in the near future.

fedoranimus commented 7 years ago

Excellent, look forward to it!

tfoxy commented 7 years ago

Working on this right now, just to let you know.

tfoxy commented 7 years ago

After a really long time, it's finally done! You can download the 2.1.0 version. Some APIs are missing because they are not present in @types/chrome. If there are some errors in the definitions, please create a new issue.

Hope this helps!

ghost commented 7 years ago

It looks like the Storage interface is empty. Is this implemented? E.g. chrome.storage.local, chrome.storage.sync

tfoxy commented 7 years ago

It seems I'm not handling nested interfaces in the type definitions. I created an issue for this: #14 .