-
Notifications
You must be signed in to change notification settings - Fork 0
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
error TS2536: Type 'string' cannot be used to index type 'T' #20
Comments
|
microsoft/TypeScript#32704 (comment) so, i have written grouping utilities based on generics, |
this approach might be an alternative: https://gist.github.com/Mds92/053deeba7349ce59038d9980c5dba612 my gist shows how simple things can be by just using |
i think a solution is in place as tests ☔ are failing 🔥 ok, let me attempt to explain to my future self what has been done:
the tests for |
it looks like console.log src/utilities/display-item.utility.ts:117
group { reduced: { key: 'group-one', values: [ [Object], [Object] ] } } |
more tests are passing: console.log src/utilities/reduced-group-utility.ts:32
{ reduction:
{ 'group-three': [ [Object] ],
'group-two': [ [Object], [Object], [Object], [Object] ],
'group-one': [ [Object], [Object] ] } } |
my apologies to anyone out there getting a breaking change in a minor version: https://www.npmjs.com/package/songhay |
there are only 5 StackOverflow articles related to
TS2536
: https://stackoverflow.com/search?q=ts%282536%29these @mariusschulz articles might be of help:
The text was updated successfully, but these errors were encountered: