
dot-into, pipes in TypeScript
So I have a little library for JavaScript and TypeScript called dot-into , which is something I actually every so often use in personal projects I've written using said languages. I've posted about it before back when I launched it, and I've updated it a few times. Here's the short of it: // This: third ( second ( first ( data )), moreData ); // Becomes this: first ( data ). into ( second ). into ( third , moreData ); I just released version 3.0.0 , which breaks ES5 compatibility but fixes some outstanding type inference problems that have existed since I introduced TypeScript support. Basically, it should now work with functions that use generic types. However, it's still broken for functions with multiple type signatures, sadly. But it's an easy fix: // This breaks inference: data . into ( multiSignatureFn ); // This doesn't: data . into (( value ) => multiSignatureFn ( value )); I guess I wanted to post about it again because the biggest problem that it had, in my eyes, was that any
Continue reading on Dev.to
Opens in a new tab

