Files
DefinitelyTyped/types/log-rotate/index.d.ts
Sander S 4fab84efc0 🤖 Merge PR #63578 [log-rotate] add type definition by @sandrewTx08
* [log-rotate] add type definition

* [log-rotate] function naming
2022-12-12 12:58:04 -08:00

24 lines
798 B
TypeScript

// Type definitions for log-rotate 0.2
// Project: https://github.com/dstokes/log-rotate#readme
// Definitions by: sandrewtx08 <https://github.com/sandrewTx08>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function logRotate(file: string, options: logRotate.Options, cb: logRotate.Callback): void;
declare function logRotate(file: string, cb: logRotate.Callback): void;
declare namespace logRotate {
type Callback = (err: Error | null, rotated?: string) => void;
interface Options {
/**
* Compress rotated files with gzip
*/
compress?: boolean;
/**
* Move a log file while incrementing existing indexed / rotated logs
*/
count?: number;
matcher?: RegExp;
}
}
export = logRotate;