-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add type definitions #6
Conversation
This commit adds type definitions for `plugin-error`. These types are adapted from the ones of `gulp-util`. The main changes are that the types are more based on the documentation instead of the implementation. It means that the `error` property used internally is not longer exposed as an option (it matches the tests). It also tries to prevent the use of the `plugin` option if it will be overriden. It also adds support for inference of additional properties from wrapped errors when the second argument is a real error. This commit also adds some tests for the types. It just runs the compiler with the `noEmit` option and checks for errors. Closes gulpjs#5
@phated |
Looks great! Thanks @demurgos - I'm going to merge this but not publish until I do some maintenance on the repo. |
Could you publish the current version as a semver-minor update? I know that you'd prefer to first do some maintenance, but it's better to not block publication if you don't have time to do it at the moment. |
@demurgos I actually have the major version bump ready but was waiting on some licensing feedback. I didn't get a chance to finish it once I got the response but I can later today (when I get back to my other computer). Side note: a semver-minor when below 1.0 has the same semantics of a major above 1.0 - so in this case, a semver minor is the same as bumping to 1.0 |
Ok, thanks for the update. |
@demurgos published as 1.0.0 |
This commit adds type definitions for
plugin-error
.These types are adapted from the ones of
gulp-util
.The main changes are that the types are more based on the
documentation instead of the implementation. It means that the
error
property used internally is no longer exposed as an option (it matches
the tests). It also tries to prevent the use of the
plugin
option ifit will be overriden. It also adds support for inference of additional
properties from wrapped errors when the second argument is a real error.
This commit also adds some tests for the types. It just runs the
compiler with the
noEmit
option and checks for errors.I had to set explicit versions for the test dependencies (instead of
*
)because their latest versions require Node 4+ (the CI runs on Node
0.10
,0.12
and3
).I tested it locally and as a replacement for
gulp-util
for thegulp-tslint
plugin.Closes #5