Skip to content
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 TypeScript typing definition file. #12

Merged
merged 3 commits into from
Jun 29, 2016

Conversation

endel
Copy link
Contributor

@endel endel commented Jun 25, 2016

Allow TypeScript users to import tiny-emitter easily through:

import EventEmitter = require("tiny-emitter")

Cheers!

@scottcorgan
Copy link
Owner

So I'm unfamiliar with Typescript definitions. Any screenshots are tests you can provide just I feel safer merging?

This is great by the way! Been hoping this would happen soon!

@endel
Copy link
Contributor Author

endel commented Jun 25, 2016

Sure @scottcorgan,

I've made some changes and copied this index.d.ts file my project's node_modules/tiny-emitter/index.d.ts and it worked. Don't know how to programatically test this thing, but here's a screenshot of VisualStudio Code evaluating it successfully:

screen shot 2016-06-25 at 20 12 44

TypeScript will resolve index.d.ts in the module's root directory (see module resolution), so after merging and publishing it should hopefully be ready to use!

@scottcorgan scottcorgan merged commit 4b17d45 into scottcorgan:master Jun 29, 2016
@scottcorgan
Copy link
Owner

Great stuff! Thanks!

Published as 1.1.0

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.

None yet

2 participants