This allows us to enforce "null" in JavaScript, without accepting "undefined".
This is pretty JavaScript-specific, but so is the "undefined" type, and one of the desired features of the whole basic/advanced system is to support cases like this.
For example, to enforce null and not undefined in the DSL, you must cast the value (otherwise both null and undefined will be accepted):
This allows us to enforce "null" in JavaScript, without accepting "undefined".
This is pretty JavaScript-specific, but so is the "undefined" type, and one of the desired features of the whole basic/advanced system is to support cases like this.
For example, to enforce
null
and notundefined
in the DSL, you must cast the value (otherwise bothnull
andundefined
will be accepted):