Typescript v5 + eslint 8.57 WIP

This commit also improves some type handling in the project.
This commit is contained in:
John Livingston
2024-09-07 14:49:27 +02:00
parent 64a9c7be21
commit 7b3d93b290
41 changed files with 2652 additions and 3054 deletions

View File

@ -10,7 +10,7 @@ import { reloadProsody } from './ctl'
type Rotate = (file: string, options: {
count?: number
compress?: boolean
}, cb: Function) => void
}, cb: (err: any) => void) => void
const rotate: Rotate = require('log-rotate')
interface ProsodyLogRotate {
@ -27,9 +27,10 @@ async function _rotate (options: RegisterServerOptions, path: string): Promise<v
rotate(path, { count: 14, compress: false }, (err: any) => {
if (err) {
options.peertubeHelpers.logger.error('Failed to rotate file ' + path, err)
return resolve()
resolve()
return
}
return resolve()
resolve()
})
})
return p
@ -79,7 +80,7 @@ function startProsodyLogRotate (options: RegisterServerOptions, paths: ProsodyFi
}, checkInterval)
logRotate = {
timer: timer,
timer,
lastRotation: Date.now()
}
}