-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Discuss: Replace implicit return type with explicit and void return? #38
Comments
That would make the definitions a lot cleaner. Wouldn't it also help if we ensure that every promise has a defined type |
Yeah I think if possible we should try and have the wrapper be as small as possible, and use interfaces for the option objects as well:
I also am not a huge fan of having the interfaces cluttering up the top of the files, it would be nice to have just the description of the wrapper, with the very concise method definitions. I can't remember if there is a good way to move them into their own files, while still using Regarding the promises, I agree, if possible they should all have the correct type. |
Is it something like this that you're looking for : https://www.npmjs.com/package/declaration-bundler-webpack-plugin ? |
Right now many of the wrapper functions return something along the lines of:
With the intention to reduce confusion about the decorator magic that is happening to change the return type. But I'm wondering if we just add the return type and a void return, so each wrapper looks more like an interface:
Seems a bit cleaner, @ihadeed thoughts?
The text was updated successfully, but these errors were encountered: