From 50f320f4ec287700da033f28021c876665dfcf84 Mon Sep 17 00:00:00 2001 From: Borewit Date: Mon, 3 Sep 2018 20:37:28 +0200 Subject: [PATCH] #65: wrap encoding string parameter in option object --- lib/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.ts b/lib/index.ts index 6e744c4..8446f34 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -183,7 +183,7 @@ export function bundle(options: Options): BundleResult { mainFileContent += generatedLine + "\n"; }); mainFile = path.resolve(baseDir, "dts-bundle.tmp." + exportName + ".d.ts"); - fs.writeFileSync(mainFile, mainFileContent, 'utf8'); + fs.writeFileSync(mainFile, mainFileContent, { encoding: 'utf8' }); } trace('\n### find typings ###'); @@ -424,7 +424,7 @@ export function bundle(options: Options): BundleResult { } } - fs.writeFileSync(outFile, content, 'utf8'); + fs.writeFileSync(outFile, content, { encoding: 'utf8' }); bundleResult.emitted = true; } else { warning(" XXX Not emit due to exist files not found.")