From ceebd7b2edaa097daebcd64d3d6854c43dcad880 Mon Sep 17 00:00:00 2001 From: Aleh Zasypkin Date: Fri, 8 Sep 2017 17:06:14 +0200 Subject: [PATCH] [node] rename `defaultEncoding` option property to `encoding`. Turn-off `no-var` dtslint rule. (#19175) --- types/fs-extra-promise/fs-extra-promise-tests.ts | 2 +- types/node/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/fs-extra-promise/fs-extra-promise-tests.ts b/types/fs-extra-promise/fs-extra-promise-tests.ts index 75fa32f876..f273d6efb6 100644 --- a/types/fs-extra-promise/fs-extra-promise-tests.ts +++ b/types/fs-extra-promise/fs-extra-promise-tests.ts @@ -202,7 +202,7 @@ readStream = fs.createReadStream(path, { writeStream = fs.createWriteStream(path); writeStream = fs.createWriteStream(path, { flags: str, - defaultEncoding: str + encoding: str }); function isDirectoryCallback(err: Error, isDirectory: boolean) {} diff --git a/types/node/index.d.ts b/types/node/index.d.ts index cf79ab990f..2447e3190f 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -4227,7 +4227,7 @@ declare module "fs" { */ export function createWriteStream(path: PathLike, options?: string | { flags?: string; - defaultEncoding?: string; + encoding?: string; fd?: number; mode?: number; autoClose?: boolean;