(no title)
9034725985 | 3 years ago
You could say technically could be simply { "Unsubscribe__c": false } or even {} both of which are silly in my case because there is no key for me to identify who the person is but they are valid inputs.
Or the test case I have is https://github.com/kusl/salesforcecontactmapper/blob/eff0b3e...
Or the input could have a thousand key values and I only care about some of them. What should my object look like? How do I create a class that says everything that ends in "__c" is something I care about? I tried unknown. I tried Object. How do I fix this (and learn something so I fix all future code I write)?
erur|3 years ago
If you wanna go down that rabbit hole, I'd suggest Typescript type challenges. Completely blew my mind when I came across it the first time.
When you start out with typescript you might think Omit<> and Partial<> are cool but holy hell, you can do so much more.
sarahdellysse|3 years ago
9034725985|3 years ago
unknown|3 years ago
[deleted]
wizofaus|3 years ago
9034725985|3 years ago
> Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Object'. No index signature with a parameter of type 'string' was found on type 'Object'.ts(7053)