Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I did not fully understand the
Task
example in chapter 8 and following the link to Folktale 2 and the newtask
implementation made me even more confused.I tried to change the example to work with Folktale 2 but I do not know what to do with the error as it does not make sense in a
cleanup
operation.Then I found
data.task
from the same author and with one minor change to the example everything worked as expected.I added
String
because thedata
part of thefs.readFile
callback is aBuffer
in node version 14. I am not sure if was astring
at the time of writing the example.I think it is far easier to follow examples if they work with the current versions of contemporary software. Since
data.task
has been published as a separate module, it should be future proof with no apparent reason for change.PS: My editor automatically deletes dangling spaces, therefore there is a bunch of seemingly non-changed lines. But I think it is in everyone's interest, to not have dangling spaces littering the files.