Fix styling issues in sonic-boom

This commit is contained in:
Alexandre Ferrando
2018-10-30 12:11:58 +01:00
parent 0dca0edc49
commit e399599308
2 changed files with 11 additions and 18 deletions
+4 -4
View File
@@ -7,7 +7,7 @@
import { EventEmitter } from 'events';
export = SonicBoom
export = SonicBoom;
declare class SonicBoom extends EventEmitter {
/**
@@ -15,12 +15,12 @@ declare class SonicBoom extends EventEmitter {
* relative protocol is enabled. Default: process.stdout
* @returns a new sonic-boom instance
*/
constructor(fileDescriptor: String | Number)
constructor(fileDescriptor: string | number)
/**
* Writes the string to the file. It will return false to signal the producer to slow down.
*/
write(string: String): void;
write(string: string): void;
/**
* Writes the current buffer to the file if a write was not in progress.
@@ -31,7 +31,7 @@ declare class SonicBoom extends EventEmitter {
/**
* Reopen the file in place, useful for log rotation.
*/
reopen(file: String): void;
reopen(file: string): void;
/**
* Flushes the buffered data synchronously. This is a costly operation.
+7 -14
View File
@@ -1,19 +1,12 @@
import SonicBoom = require('sonic-boom');
const sonic = new SonicBoom(1);
import SonicBoom = require('sonic-boom')
const sonic = new SonicBoom(1)
sonic.write('hello sonic\n')
sonic.flush()
sonic.flushSync()
sonic.end()
sonic.destroy()
sonic.write('hello sonic\n');
sonic.flush();
sonic.flushSync();
sonic.end();
sonic.destroy();