origamitower / folktale

[not actively maintained!] A standard library for functional programming in JavaScript
https://folktale.origamitower.com/
MIT License
2.05k stars 102 forks source link

WIP: TypeScript typings #157

Open robotlolita opened 7 years ago

robotlolita commented 7 years ago

This PR tracks the work on TypeScript typings (#65). These will work with Folktale 2.x. There's a separate branch to rewrite Folktale in TypeScript (#115). That'll be a breaking change (using ES6 modules), and thus a new major version. TypeScript in Folktale will likely be released early 2018.

Current status

v3.0.1-ts is available on the tstypes channel: npm install folktale@tstypes

[/] indicates partial support, [X] indicates full support.

robotlolita commented 6 years ago

Well, overloaded functions on arrays will have to be replaced by static arity functions. Too many silent type errors from TypeScript otherwise :/

robotlolita commented 6 years ago

2.1.0-alpha4: fixed .apply types and added missing definitions for Maybe/Result/Validation. Overloaded definitions were removed, though.

robotlolita commented 6 years ago

3.0.0-alpha5 adds fixed-arity versions of the previously-overloaded functions. More details coming up in a blog post later :>

robotlolita commented 6 years ago

3.0.1-ts fixes .fold and .fromNullable in Maybe

robotlolita commented 6 years ago

Semigroup types don't work with TS 2.8.1