-
Notifications
You must be signed in to change notification settings - Fork 26
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
Aggregate Bug #79 #80
Conversation
Proposed fix for: ENikS#79 Untested with code in this form since I do not have a Node.js or Angular environment setup. However it was tested with alterations to the Browersified version (https://unpkg.com/linq-es2015@2.4.33/dist/linq.js).
Seems to have an issue with build. |
I can't really make out whatever it's complaining about. |
485 lib/linq.ts(193,66): error TS2345: Argument of type 'A' is not assignable to parameter of type 'number'. |
Could you please explain what exactly are you doing? |
TypeScript type checking
I think I figured it out. Also, I implemented the exact solution I proposed in the issue, which I did explain partly why it should be done like that. Although I'm sure there are better ways. |
Awesome! Looks like the checks passed! |
Could you be so kind and add an extra test for the condition you are trying to fix? |
Whats the proper way to go about that? |
Add it to immediate.ts in test under the 'Aggregate' area? |
Just add it here |
Almost there test/immediate.ts(42,70): error TS2345: Argument of type '(c: number, n: string) => string' is not assignable to parameter of type '(aggr: number, x: string) => number'. Type 'string' is not assignable to type 'number'. |
Remove Number test case. Only applicable to browserfied code.
Almost indeed! I know nothing of TypeScript, as far as coding it, but makes sense that I'm seeing these kind of errors. Browser JS is too lenient, but that's the way I like it. I just removed one of the test cases since it was only pertinent to how the browserfied code would handle it. Boom! Success! |
Thank you for your help! |
No problem. Thanks for bearing with me. I've got my foot in the door now. |
BTW, is that browserfied version hosted on the NPM CDN updated automatically through some linked process, or is that a manual update process? If so, any idea when it can be updated? |
It should be automated. Path includes the version... |
Hmmm I feel stupid for not being able to figure this out but I've loaded it from this link |
@2.4.33 - is the version |
Proposed fix for: #79
Untested with code in this form since I do not have a Node.js or Angular environment setup. However it was tested with alterations to the Browersified version. Check out this fiddle.
P.S. First Pull Request :)