-
Notifications
You must be signed in to change notification settings - Fork 91
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
#307 Assign type of any to asMap and asMappedResults #308
base: master
Are you sure you want to change the base?
Conversation
…nt to meaningful specific type
I would suggest we make this a generic so the caller can directly provide a return type instead of introducing 'any'. Thoughts? |
I agree @ShawnTalbert , I've been meaning to do this. @bbahrman , let me know if you need a hand converting this to use Generics. |
@ShawnTalbert @darrenhillconsulting - Thanks for the suggestion to use a generic, new to me, sorry it took a bit for me to get myself understanding what you were trying to do with it. Thanks Darren for the example. I think I just copied and pasted your example in, but wanted to test it out to be sure I understood the why (I trust you, but like to learn). Do either of you feel the need to have the generic type be a named type in some way? I don't think it does, but let me know if you want any further changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe remove unrelated changes? Like the JSDoc changes?
@darrenhillconsulting fair point, sorry those were some errant whitespace changes. I've cleaned them up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this change. @ShawnTalbert ?
Assigning type of any to asMap and asMappedResults allows for them to be assigned to meaningful interfaces/types
See: #307