Fixup for "node" types, fs.createReadStream and fs.createWriteStream functions.

This commit is contained in:
Sebastien PUECH
2017-06-22 13:35:40 +02:00
parent 755b23622a
commit e86d4cc126
+4 -3
View File
@@ -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;