File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,10 +3,8 @@ import type {
33} from '../types' ;
44
55const createBlockingWriter = ( stream : NodeJS . WritableStream ) : LogWriter => {
6- return {
7- write : ( message : string ) => {
8- stream . write ( message + '\n' ) ;
9- } ,
6+ return ( message : string ) => {
7+ stream . write ( message + '\n' ) ;
108 } ;
119} ;
1210
Original file line number Diff line number Diff line change @@ -39,7 +39,9 @@ export const createRoarrInitialGlobalState = (currentState: any): RoarrGlobalSta
3939
4040 newState = {
4141 ...newState ,
42- ...createNodeWriter ( ) ,
42+ ...{
43+ write : createNodeWriter ( ) ,
44+ } ,
4345 asyncLocalStorage,
4446 } ;
4547 // eslint-disable-next-line no-empty
Original file line number Diff line number Diff line change @@ -2,16 +2,15 @@ import type {
22 AsyncLocalStorage ,
33} from 'async_hooks' ;
44
5- export type LogWriter = {
6- write : ( message : string ) => void ,
7- } ;
5+ export type LogWriter = ( message : string ) => void ;
86
97export type MessageContext = any ;
108
11- export type RoarrGlobalState = LogWriter & {
9+ export type RoarrGlobalState = {
1210 asyncLocalStorage ?: AsyncLocalStorage < MessageContext > ,
1311 sequence : number ,
1412 versions : readonly string [ ] ,
13+ write : LogWriter ,
1514} ;
1615
1716export type SprintfArgument = boolean | number | string | null ;
You can’t perform that action at this time.
0 commit comments