logger/src/Types.ts
2023-04-16 16:55:02 +03:00

24 lines
462 B
TypeScript

import EventEmitter from "node:events";
type Shard = {
id: number
} & EventEmitter;
type WriteOptions = {
subheader?: string,
shard?: Shard,
broadcast?: boolean
}
type IPCMessage = {
[key: string]: string | boolean
_guard: string
type: string,
message: string,
header: string,
broadcast: boolean
}
type LogFunction = (str: string, opts?: WriteOptions) => void
export { WriteOptions, Shard, IPCMessage, LogFunction };