Code coverage report for core/src/io/StringWriter.ts

Statements: 100% (9 / 9)      Branches: 100% (0 / 0)      Functions: 100% (3 / 3)      Lines: 100% (7 / 7)      Ignored: none     

All files » core/src/io/ » StringWriter.ts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 171 1     1 3     8       8 8      
import {Writable} from 'stream';
import {RestrictTo, System} from '@btilford/ts-base-lint';
 
@RestrictTo({ system: { name: System.Node } })
export class StringWriter extends Writable {
  protected _output = '';
 
  get output(): string | undefined {
    return this._output;
  }
 
  _write(chunk: any, encoding: string, callback: (error?: (Error | null)) => void): void {
    this._output += chunk;
    callback();
  }
}