shapify icon indicating copy to clipboard operation
shapify copied to clipboard

typings for `shaper`

Open posva opened this issue 5 years ago • 3 comments

Currently typings for the shaper function (equivalent of mapper => shapify.bind(null, mapper) isn't correctly typed)

I couldn't make this work, if you can lend a hand, take a look in the types folder

posva avatar Mar 29 '19 13:03 posva

Is there any way to make the typings logic more modular/reusable/friendly? Maybe this way it's gonna be easier to scale it.

The generics and nested ternaries made me have a hard time on trying to understand it

I kinda understand how it works from my background with java, but the index.d.ts file just looks like a letter soup.

trickstival avatar Mar 29 '19 17:03 trickstival

My point is: if it's hard to understand, is there a way to abstract it to make it simpler?

trickstival avatar Mar 29 '19 17:03 trickstival

I honestly don't know. If someone shows up something more readable, I'm interested to learn from it

posva avatar Mar 29 '19 18:03 posva