@@ -365,7 +365,7 @@ export interface IWriteFileOptions {
365365}
366366
367367let canFlush = true ;
368- export function writeFileAndFlush ( path : string , data : string | NodeBuffer | NodeJS . ReadableStream , options : IWriteFileOptions , callback : ( error ?: Error ) => void ) : void {
368+ export function writeFileAndFlush ( path : string , data : string | Buffer | NodeJS . ReadableStream , options : IWriteFileOptions , callback : ( error ?: Error ) => void ) : void {
369369 options = ensureOptions ( options ) ;
370370
371371 if ( typeof data === 'string' || Buffer . isBuffer ( data ) ) {
@@ -466,7 +466,7 @@ function doWriteFileStreamAndFlush(path: string, reader: NodeJS.ReadableStream,
466466// not in some cache.
467467//
468468// See https://github.com/nodejs/node/blob/v5.10.0/lib/fs.js#L1194
469- function doWriteFileAndFlush ( path : string , data : string | NodeBuffer , options : IWriteFileOptions , callback : ( error ?: Error ) => void ) : void {
469+ function doWriteFileAndFlush ( path : string , data : string | Buffer , options : IWriteFileOptions , callback : ( error ?: Error ) => void ) : void {
470470 if ( options . encoding ) {
471471 data = encode ( data , options . encoding . charset , { addBOM : options . encoding . addBOM } ) ;
472472 }
@@ -503,7 +503,7 @@ function doWriteFileAndFlush(path: string, data: string | NodeBuffer, options: I
503503 } ) ;
504504}
505505
506- export function writeFileAndFlushSync ( path : string , data : string | NodeBuffer , options ?: IWriteFileOptions ) : void {
506+ export function writeFileAndFlushSync ( path : string , data : string | Buffer , options ?: IWriteFileOptions ) : void {
507507 options = ensureOptions ( options ) ;
508508
509509 if ( options . encoding ) {
0 commit comments