3 ms·
I'm curious about the matching for the Maybe type (type Maybe<T> = T | void;). Is void an alias or superset of undefined? Perhaps because undefined is a reserve
by e12e 8y ago
I'm curious about the matching for the Maybe type (type Maybe<T> = T | void;). Is void an alias or superset of undefined? Perhaps because undefined is a reserved word? Wouldn't it make more sense if it was either:
type Maybe<T> = T | undefined;
x === undefined
Or:
type Maybe<T> = T | void;
x === void; // or: void?(x)