TypeScript Version: 3.8.0-dev.20191207
Search Terms:
Code
With strict null checks enabled:
import * as fs from 'fs';
fs.stat('/path/to/file', function(err, stats) {
if (stats.isFile || stats.isDirectory) {
}
});
Expected behavior:
Accesses to isFile and isDirectory are reported as errors since these are actually functions
Actual behavior:
No errors.
Errors are only reported when there is a single conditional
Playground Link:
Related Issues:
TypeScript Version: 3.8.0-dev.20191207
Search Terms:
Code
With strict null checks enabled:
Expected behavior:
Accesses to
isFileandisDirectoryare reported as errors since these are actually functionsActual behavior:
No errors.
Errors are only reported when there is a single conditional
Playground Link:
Related Issues: