WriteStream object is not accepted in stream array
Author: tautfCreated Jun 2, 2021Updated Jun 2, 2021
Describe the bug A clear and concise description of what the bug is.
private logFile: WriteStream = fs.createWriteStream(process.cwd() + path.join('////', 'logs', 'watchguard.txt'), {
flags: 'a',
encoding: 'utf8',
autoClose: true
});is not accepted in SignaleOptions as stream.
To Reproduce Steps to reproduce the behavior.
Create an object of type SignaleObject and at the above as a stream into the array.
Expected behavior A clear and concise description of what you expected to happen. WritableStream is accepted.
Technical Info (please complete the following information)
- OS: MacOS latest
- Signale Version: 1.4.0 / @types/signale: 1.4.1
- Node.js Version: 15.14
Additional context Add any other context about the problem here.
private logFile: WriteStream = fs.createWriteStream(process.cwd() + path.join('////', 'logs', 'watchguard.txt'), {
flags: 'a',
encoding: 'utf8',
autoClose: true
});
private options: SignaleOptions = {
disabled: false,
interactive: false,
logLevel: process.env.LOG_LEVEL,
scope: '',
stream: [
process.stdout,
this.logFile
],
types: ....Error:
(property) Logger.logFile: fs.WriteStream Type 'WriteStream' is missing the following properties from type 'WriteStream': clearLine, clearScreenDown, cursorTo, moveCursor, and 36 more.ts(2740)
Source: klaudiosinani/signale