Nothing here yet.
For an IFace1 object, if you call Object.keys() on it, it will always return an array with "NotOptional" it it. Not so with IFace2. Like you said, in practical terms that's mostly useful for memory allocation. But sometimes there can also be subtle implications as well; kinda like the difference between null and undefined.
One of my favourite util functions using Array.from: const listRange = (begin, end, inc = 1) => Array.from({ length: Math.ceil((end - begin) / inc) }, (_, i) => begin + i * inc); // console.log(listRange(0, 4, 1)); // [0, 1, 2, 3] // console.log(listRange(0, 4)); // [0, 1, 2, 3] // console.log(listRange(1, 10, 2)); // [1, 3, 5, 7, 9]