3 ms·
I think it's just the sample code needs to be x === null. Nothing to do with TypeScript. The sample is a good example to illustrate the union type.
by ww520 10y ago
I think it's just the sample code needs to be x === null. Nothing to do with TypeScript. The sample is a good example to illustrate the union type.