`narrow` vs `satisfying`
I've ran across both functions, I can see the signatures are the same, but the type are not. I was wondering what the different is, between the two ?
7 Replies
One is for input another is for output
Or something
So it's different for morphs only
Or something?? 😂
Well I didn't use it myself so can't say for sure
kk, I'll try to compare the two with in/out
this is the difference in the source code
narrow
applies the constraint to the output, whereas satisfying
applies the constraint to the inputso to see an actual difference, I would need to pipe the type in order to alter its input, correct ?
There'd need to be some form of transform, yes. Not necessarily a
.pipe()
explicitly though.
E.g.: