Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(lettable): mention TS >= 2.4 is required #2869

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/lettable-operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Starting in version 5.5 we have shipped "lettable operators", which can be acces

**NOTE**: During 5.5 beta we will be bikeshedding a few of the names for operators that we had to give new names to due to keyword restrictions in javascript.

**NOTE**: If you're using TypeScript, version >= 2.4 is required, otherwise lettable operators will lose the type and compilation will break.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little more "doom and gloom" than I'd like.. It sounds like you can't use TypeScript 2.3 or under, which isn't true. It should just be NOTE: in TypeScript 2.3 and under, typings will need to be added to functions passed to operators or something like that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if it's true technically, in real world no one will do this. You really need to add the type to each functions, sometimes even twice, so that's clearly not usable. And in some way it's really an error, as lettable operators transfer the wrong type in TS < 2.4, then causing real compilation errors when you do any action on the data. But you're the owner, you choose what's best.

These operators are:

1. `do` -> `tap`
Expand Down