We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
IxJS version: 5.0.0
Code to reproduce:
import { toMap } from 'ix/iterable'; // ... const data = [{ key:'alpha', value:true }]; toMap<{ key:string, value:boolean }, string, boolean>(data, { keySelector: (item) => item.key });
Expected behavior: Typescript should compile this code.
Actual behavior: While the code itself seems to work, Typescript complains: Type 'string' is not assignable to type 'boolean'.ts(2322)
Additional information: In https://github.com/ReactiveX/IxJS/blob/master/src/asynciterable/tomap.ts and https://github.com/ReactiveX/IxJS/blob/master/src/iterable/tomap.ts the return value of keySelector should be TKey (or sth similar) instead of TElement.
keySelector
TKey
TElement
The text was updated successfully, but these errors were encountered:
fix(toMap): fix return type of keySelector
c6f7385
change return type of keySelector from TElement to TKey, since keySelector returns keys, not elements Closes: ReactiveX#364
fix(toMap): fix return type of keySelector (#365)
eab2f10
change return type of keySelector from TElement to TKey, since keySelector returns keys, not elements Closes: #364
Successfully merging a pull request may close this issue.
IxJS version:
5.0.0
Code to reproduce:
Expected behavior:
Typescript should compile this code.
Actual behavior:
While the code itself seems to work, Typescript complains: Type 'string' is not assignable to type 'boolean'.ts(2322)
Additional information:
In https://github.com/ReactiveX/IxJS/blob/master/src/asynciterable/tomap.ts and https://github.com/ReactiveX/IxJS/blob/master/src/iterable/tomap.ts the return value of
keySelector
should beTKey
(or sth similar) instead ofTElement
.The text was updated successfully, but these errors were encountered: