Open tonisostrat opened 6 years ago
@dalefrancis88 I do remember that point. It is actually ill-advised to maintain type definitions within a library that is written in plain JavaScript. When it comes to using TypeScript, remember the "no free lunch" principle. Employing TS in a project introduces a significant overhead when developers spend time creating and maintaining relevant types. I have experienced that over the years.
@bennypowers thanks! Merged.
can I be of any help @jakubbarczyk ? Like add missing types (if so which ones would you like me to help with)? In any case, thanks a lot (for the typings and this cool lib).
Hey @pyrho, thanks for reaching out. I went through all the crocks
typings and it seems that the following items still require attention:
crocks
documentation; appropriate typings must be inferred directly from the library's code.Looking at @bennypowers' contribution, there might be a need to refactor the existing definitions to use the declare
keyword and move them from barrels (index.d.ts) to dedicated files.
FYI @dalefrancis88
Hi @jakubbarczyk , I'm learning crocks as a side project and I will like to use types, I show your fork on DefinitelyTyped and this thread , and I was wondering if you accept PR on your branch to help you on types definitions. I see that @pyrho is also helping and I don't want to step into his work or working in something that is already assigned or done
Sure, I welcome any help @area73. My previous comment still holds. Thanks!
It's worth noting that TS 4's variadic tuples will make capturing compose
and curry
possible in their type system
I've been quite busy lately, but I'm picking up the pace. I should be able to finalize the typings by the end of next week. Please, consider joining Crocks' gitter channel.
@jakubbarczyk Thanks for the work that you and others have done on this. I've taken a look at your DefinitelyTyped fork, and I'm wondering where the progress of this issue lies as it would be great to get the types published.
@kompedia At least if the PR gets raised then I can bug them 😆
@kierans Thanks! I planned to create a PR some time ago. Due to "the bug" I had to postpone. Let me see about that this weekend. Will keep you posted. DT owners' review might take a while too, mind you.
@kompedia At least if the PR gets raised then I can bug them 😆
To all it may concern: @types/crocks Now that the initial release is out, I would very much want to make Crocks typings more sophisticated.
To all it may concern: @types/crocks Now that the initial release is out, I would very much want to make Crocks typings more sophisticated. wow looking forward to trying this soon!
In my opinion, the most promising TypeScript functional programming ecosystem to use today could be Effect
Without starting a fight (because we programmers love our wars <cough>tabs</cough>) I’ve personally found TS (and most statically typed languages) to be too cumbersome to do elegant FP in. I’ve also found type definitions in code largely unnecessary as if my signatures are getting too unwieldy it’s a sign I’m to doing too much in that function and I need to break it apart.
Consider the elegance of String -> String -> Object
vs (a: String): (b: String) => Record<any, any>
. Given I tend to orientate more towards pointfree programming I might implement that signature with a combinator (eg: converge
). Whereas in TS I find the compiler tends to choke sometimes if I don’t declare variables properly leading to verbose syntax
I’ve been working on a TS codebase professionally for about a year now and it’s a mixture of pseudo FP (in that I compose functions and use concepts like currying in places but not pure functions as we don’t use monads to isolate effects, etc) and OOP. TS works great for OOP, but I just find it inelegant for FP.
I do like Crocks however 😆
Have you planned or thought about creating typings files to support us TS developers?