From 7a6da49f3a881d529af2e499e1580fa88185d2da Mon Sep 17 00:00:00 2001 From: Ivo Stratev Date: Sat, 9 Jul 2016 09:33:42 +0300 Subject: [PATCH] Now it matches Node.js fs::open* definition (#10032) From Node.js API Reference (https://nodejs.org/dist/latest-v6.x/docs/api/fs.html#fs_fs_open_path_flags_mode_callback): fs.open(path, flags[, mode], callback)# Added in: v0.0.2 path | flags | mode callback fs.openSync(path, flags[, mode])# Added in: v0.1.21 path | flags | mode --- node/node.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/node.d.ts b/node/node.d.ts index a8b7f2fd20..5f10d0aaca 100644 --- a/node/node.d.ts +++ b/node/node.d.ts @@ -1542,10 +1542,10 @@ declare module "fs" { export function close(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; export function closeSync(fd: number): void; export function open(path: string | Buffer, flags: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void; + export function open(path: string | Buffer, flags: number, mode: number, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void; export function open(path: string | Buffer, flags: string, mode: number, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void; - export function open(path: string | Buffer, flags: string, mode: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void; + export function openSync(path: string | Buffer, flags: number, mode?: number): number; export function openSync(path: string | Buffer, flags: string, mode?: number): number; - export function openSync(path: string | Buffer, flags: string, mode?: string): number; export function utimes(path: string | Buffer, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; export function utimes(path: string | Buffer, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; export function utimesSync(path: string | Buffer, atime: number, mtime: number): void;