import of mws-advanced fails in typescript
Closed this issue ยท 4 comments
When importing '@ericblade/mws-advanced', the compiler complains that node_modules/@ericblade/mws-advanced/types/mws-advanced.d.ts' is not a module.
mws-simple can be imported, but it exhibits some very odd behavior when things get throttled. Since the throttling response is the result value, it pretty clearly should not be the cause of an exception.
hmm. I honestly haven't attempted to run either of these in a typescript project, and I'm really quite new to typescript myself. Any idea for a quick way to reproduce ? My guess is that I've done something horribly wrong in my type definitions file, but I'm not sure exactly what :|
hi @jsshapiro .. i went looking into this, and discovered that my auto-generated .d.ts file is woefully terrible and inadequate. I am removing it, and publishing a new version without it. Maybe I'll be able to put together one by hand. For now, I suggest you treat it as untyped, and add your own module declaration, as if I hadn't supplied one (or update to the new release that won't have one, so you have to anyway :) )
@jsshapiro i did take a little while to dig into creating an actual by-hand type definition, and that seems to be much more successful. it's not really very useful at this point, but i'll probably keep working on it, until it is actually useful for more than just telling you "you can supply any parameter you want" :-)
If you'd like to take a look and/or contribute, it's at #170
๐ This issue has been resolved in version 2.4.2 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐