logger/src/Types.ts
2023-06-15 13:13:46 +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 };