From e86d4cc1269863ef3f8505f119bd689d21f701ea Mon Sep 17 00:00:00 2001 From: Sebastien PUECH Date: Thu, 22 Jun 2017 08:52:51 +0200 Subject: [PATCH] Fixup for "node" types, fs.createReadStream and fs.createWriteStream functions. --- types/node/index.d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/types/node/index.d.ts b/types/node/index.d.ts index 952cf98e4d..423fae41f1 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -2497,6 +2497,7 @@ declare module "dgram" { declare module "fs" { import * as stream from "stream"; import * as events from "events"; + import * as url from "url"; interface Stats { isFile(): boolean; @@ -2975,7 +2976,7 @@ declare module "fs" { export function access(path: string | Buffer, mode: number, callback: (err: NodeJS.ErrnoException) => void): void; /** Synchronous version of fs.access. This throws if any accessibility checks fail, and does nothing otherwise. */ export function accessSync(path: string | Buffer, mode?: number): void; - export function createReadStream(path: string | Buffer, options?: { + export function createReadStream(path: string | Buffer | url.URL, options?: string | { flags?: string; encoding?: string; fd?: number; @@ -2984,9 +2985,9 @@ declare module "fs" { start?: number; end?: number; }): ReadStream; - export function createWriteStream(path: string | Buffer, options?: { + export function createWriteStream(path: string | Buffer | url.URL, options?: string | { flags?: string; - encoding?: string; + defaultEncoding?: string; fd?: number; mode?: number; autoClose?: boolean;