Skip to content

Add TypeScript type definitions #197

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

Merged
merged 1 commit into from
Oct 10, 2017
Merged

Conversation

orentrutner
Copy link
Collaborator

TypeScript type definitions based on the 1.2.4 documented interface.
Gruntfile was modified to include the typings under dist/ and
package.json was modified to reference the typings, such that
TypeScript apps can find it.

#184

TypeScript type definitions based on the 1.2.4 documented interface.
Gruntfile was modified to include the typings under dist/ and
package.json was modified to reference the typings, such that
TypeScript apps can find it.
@cburgmer
Copy link
Owner

Looks good, nice work!
You should have received an invite from Github to join the project, feel free to merge yourself.

Once question on the doc strings. I believe we will have to maintain them when updating the API page in the wiki. Do they show up in tooling (e.g. IntelliJ), i.e. useful to the user? So are they worth the additional burden? If yes, happy to keep of course!

@orentrutner
Copy link
Collaborator Author

Thank you, will merge.

Yes, the jsdoc strings show up in at least some of the tooling. I know for certain that vscode formats them quite nicely upon hover and auto-completion, including parameters, object members, bullet points and code examples. I suspect that TypeScript editor plugins that leverage tsserver for parsing can/do surface them as well. But I didn't do an exhaustive review.

I understand that maintaining the comments introduces additional, ongoing burden. It's a valid concern. If you choose to strip out the comments, I'm happy to edit and delete them from the file. I will not take offense, of course, if you just wipe them out in the future.

In the vast majority of cases, the text is a direct copy+paste from the API wiki page. I added maybe a couple of sentences when context was clear in the wiki but wasn't in the isolation of code comments. My hope is that text maintenance, for the most part, is limited to remembering to copy the text from the wiki when it's updated.

There is also, of course, an ongoing concern of updating the typings when the library's code interfaces change. I'm happy to volunteer to make those changes.

@orentrutner orentrutner merged commit 73f8ae5 into cburgmer:master Oct 10, 2017
@cburgmer
Copy link
Owner

Great stuff, welcome on board!
Hope the grunt config was not to much a pain :)

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.

2 participants