-
Book Overview & Buying
-
Table Of Contents
Mastering JavaScript Functional Programming - Third Edition
By :
12.1 Extending prototypes: Whenever we added to a prototype, TypeScript would object because of a missing global declaration; can you add that declaration?
12.2 No protection? For all our containers, we use classes with a (TypeScript-only) protected attribute that didn’t allow accessing it from the “outside.” However, in the previous editions, we worked with plain JavaScript; how could we manage hiding the attribute from outsiders? A hint may help: think of a Symbol!
12.3 No abstract classes? We used abstract classes for the Maybe and Either monads, but those types of classes are only available in TypeScript. Can you figure out an alternative way of working, but in JavaScript?
12.4 Maybe tasks? In the Questions section of Chapter 8, Connecting Functions, a question (Question 8.2) had to do with getting the pending tasks for a person while taking errors or border situations into account, such as the possibility that the selected person might not...