Open blakeembrey opened 8 years ago
I see any-promise
typings are included in the NPM package. Would it be enough to add this at the top of every file?
import Promise = require('any-promise')
Sadly, only if the user also included any-promise
. Probably the best solution is to bundle es6-promise
or any-promise
typings. I don't suppose you've been using either of them with 2.0? After that Bluebird PR, I suspect they are both also broken.
But any-promise
is a dependency of mz
, so it is in node_modules
?
No, I'm still on TS1.8. What happened to Bluebird?
Oh, sorry, was https://github.com/types/npm-bluebird/pull/29. Why would someone have path-to-regexp
installed? Just to check, this is mz
.
Edit: Also, there's definitely no Promise
lib inside of path-to-regexp
, going to assume you meant mz
there. In that case, you're assuming NPM v3-style installation always which is scary. There shouldn't be any implicit dependencies, things can easily break that way.
Sorry, it's late. I meant mz. Edited my comment.
If you want to add it as a dep go ahead :) I use target: ES6 everywhere so as long as it is compatible with native promises I'm fine with it
This module doesn't require global typings in production, it'd be good to type it for ES5 without typings and use the ES6 typings instead.