Skip to content

Conversation

@JonnySpruce
Copy link
Contributor

Resolves #77

This adds typescript support for this module, allowing you to use this for TypeScript projects. (Currently it will not compile as no types declaration can be found).

This also helps users that write only in JavaScript, since editors such as VS Code can use this declaration file to suggest properties that the user may want to access in returned objects, such as the results object.

I currently haven't added any tests to this - what are the thoughts on testing for this?

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling f21e92b on JonnySpruce:add-types into 3582851 on adamreisnz:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling f21e92b on JonnySpruce:add-types into 3582851 on adamreisnz:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling f21e92b on JonnySpruce:add-types into 3582851 on adamreisnz:master.

@adamreisnz
Copy link
Owner

Thanks for putting this together. What exactly does it means that it won't compile yet, and will that impact TypeScript projects using this module?

I'd like to get another pair of 👀 on this from someone else to check/review before merging, will ask in the main thread.

@JonnySpruce
Copy link
Contributor Author

I meant before this PR, if you require this module in a TypeScript project and have the no-implicit-any rule set to true, then the TypeScript project will not compile as it could not find types for this module. This PR resolves that issue.

There should be no impact to TypeScript projects currently using this module.

@adamreisnz adamreisnz merged commit 82a61a1 into adamreisnz:master May 14, 2019
@adamreisnz
Copy link
Owner

Thanks, merged and released as 4.1.0 on npm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: Add types for use in Typescript

3 participants