sonic-boom.reopen file descriptor should be optional

This commit is contained in:
Alexandre Ferrando 2018-11-05 11:44:10 +01:00
parent e31b168ef1
commit eeb04fa55a
2 changed files with 3 additions and 1 deletions

View File

@ -31,7 +31,7 @@ declare class SonicBoom extends EventEmitter {
/**
* Reopen the file in place, useful for log rotation.
*/
reopen(file: string): void;
reopen(fileDescriptor?: string | number): void;
/**
* Flushes the buffered data synchronously. This is a costly operation.

View File

@ -7,6 +7,8 @@ sonic.flush();
sonic.flushSync();
sonic.reopen();
sonic.end();
sonic.destroy();