diff --git a/types/atom/atom-tests.ts b/types/atom/atom-tests.ts index e53e29b176..b295259d79 100644 --- a/types/atom/atom-tests.ts +++ b/types/atom/atom-tests.ts @@ -953,7 +953,8 @@ function testFile() { // Reading and Writing async function readFile() { - str = await file.read(); + const res = await file.read(); + if (res !== null) str = res; } const stream = file.createReadStream(); diff --git a/types/atom/index.d.ts b/types/atom/index.d.ts index 9b0d194976..5cc136f7a6 100644 --- a/types/atom/index.d.ts +++ b/types/atom/index.d.ts @@ -3547,7 +3547,7 @@ export class File { // Reading and Writing /** Reads the contents of the file. */ - read(flushCache?: boolean): Promise; + read(flushCache?: boolean): Promise; /** Returns a stream to read the content of the file. */ createReadStream(): ReadStream;