Folktale 2.1 and TypeScript Support

30 December 2017

Hello everyone~

I had this release planned for just before New Year’s but I wasn’t feeling well so that didn’t happen.

Anyway. There are two releases today: Folktale 2.1, and some experimental TypeScript support in the next release, Folktale 3.x.

A modest iteration: Folktale 2.1

The Foltkale 2.1 release is very modest, and mostly includes documentation and bug fixes. You can look at the release notes and full changelog for details.

In essence, this fixes some issues with inconsistent functions (adding new signatures and functions in the process), and fixes part of the problem with the derived .toString function in ADTs. This function still doesn’t handle circular objects, but a fix for that is coming soon.

Following the new Folktale release strategy, this is being released in the experimental (@next) channel first, so if you want to try it out you need:

$ npm install folktale@next

No problems are expected to happen as the changes were modest, but there may be edge cases with backwards compatibility of nullableToResult and Result.fromNullable. If no issues are found during this month, 2.1 will be released in the stable channel in the beginning of February.

Experimental TypeScript support

The last few months were spent on studying and getting TypeScript to work well with Folktale. Moving to a typed language has been considered for a while, and the new versions of TypeScript do make this a bit more reasonable. The plan is to have Folktale rewritten in TypeScript, and the documentation revised and improved for this by June of this year.

There are some current limitations with TypeScript that continue to make giving proper to existing (and future interesting) Folktale functionality difficult:

An initial, experimental release of Folktale with TypeScript support is available in the alpha channel. You can install it with:

$ npm install folktale@alpha

This will get you folktale@3.0.0-alpha5, which includes type definitions for most functionality, except the adt and fantasy-land modules.

The road to 3.0

So, 3.x will be primarily about TypeScript support, but here’s what’s also planned:


As always, a huge thank you to everyone who contributed to improving Folktale, by reporting errors, sending feedback, talking about it, sending patches, etc.

This release wouldn’t be possible without the contributions of @diasbruno, @gvillalta99, @MichaelQQ, @stabbylambda, @floriansimon1, and @scotttrinh. Really, thank you :>