-
Notifications
You must be signed in to change notification settings - Fork 36
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
Ammend typings for better specificity #30
Conversation
|
@pauloppenheim-gingerlabs In #19 someone else suggested removing the module declaration, although that was now over a year ago, and the documentation they link to is no longer there. Any comments? If not, I may as well merge this as is. |
I added the module declaration back |
@wbhob this looks good. As a typescript user, is it annoying if there are additional properties on the objects that aren't defined in the interface? i.e. does this make it so typescript users have to cast to |
If there are properties on the object that are not on the type, yes, accessing them is a build error that requires a cast of some kind to work around. |
Yes, all object properties should be on the interface, or else the compiler will complain. I went solely off the docs for this, so if there are other properties that you know of please add them |
I added the rest of the properties, and configured some other (in retrospect perhaps odd) behavior of this module like being a function object. |
As a note for myself (who doesn't use typescript usually) and others, here's how I verified the typings in this branch:
|
No description provided.