mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-19 16:49:45 +08:00
[atom] File.read can return Promise<null>
ea686aeffc/src/file.coffee (L270)
This commit is contained in:
@@ -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();
|
||||
|
||||
2
types/atom/index.d.ts
vendored
2
types/atom/index.d.ts
vendored
@@ -3547,7 +3547,7 @@ export class File {
|
||||
|
||||
// Reading and Writing
|
||||
/** Reads the contents of the file. */
|
||||
read(flushCache?: boolean): Promise<string>;
|
||||
read(flushCache?: boolean): Promise<string | null>;
|
||||
|
||||
/** Returns a stream to read the content of the file. */
|
||||
createReadStream(): ReadStream;
|
||||
|
||||
Reference in New Issue
Block a user