The functionality of option types is basically meaningless in
Javascript since there is the possibility to add undefined values
everywhere. Yet this makes every object value an option type,
which is not helpful.
This implementation creates distinctive types for values that are
optional, and a particular nothing value, to be
able to differentiate the option types from the everyday values.
This file implements option types in the following manner :
The functionality of option types is basically meaningless in Javascript since there is the possibility to add
undefined
values everywhere. Yet this makes every object value an option type, which is not helpful.This implementation creates distinctive types for values that are optional, and a particular
nothing
value, to be able to differentiate the option types from the everyday values.