Installation
npm install --save @types/ansi-diff-stream
Summary
This package contains type definitions for ansi-diff-stream (https://github.com/mafintosh/ansi-diff-stream).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ansi-diff-stream.
index.d.ts
/// <reference types="node" />
import { Transform } from "stream";
export = ansiDiffStream;
/**
* Create a new diff stream. You should pipe it to a ansi capable stream.
*
* @example
* import differ = require('ansi-diff-stream')
* const diff = differ()
*
* setInterval(() => {
* diff.write(`\
* This is a demo
* The time is: ${new Date()}
* That is all`);
* }, 500)
*
* diff.pipe(process.stdout)
* // =>
* // This is a demo
* // The time is: Thu Jul 14 2016 19:46:56 GMT+0200 (CEST)
* // That is all
*/
declare function ansiDiffStream(): ansiDiffStream.AnsiDiffStream;
declare namespace ansiDiffStream {
interface AnsiDiffStream extends Transform {
/**
* Will reset the diff. Useful you print something manually in between updates.
*/
reset(): void;
/**
* Clear the last printed output from the screen. Similar to doing stream.write('').
*/
clear(): void;
}
}
Additional Details
- Last updated: Mon, 06 Nov 2023 22:41:04 GMT
- Dependencies: @types/node
Credits
These definitions were written by BendingBender.