2023-04-12 19:13:14 +02:00
|
|
|
import EventEmitter from "node:events";
|
|
|
|
|
|
|
|
type Shard = {
|
|
|
|
id: number
|
|
|
|
} & EventEmitter;
|
|
|
|
|
|
|
|
type WriteOptions = {
|
|
|
|
subheader?: string,
|
|
|
|
shard?: Shard,
|
|
|
|
broadcast?: boolean
|
|
|
|
}
|
|
|
|
|
2023-04-14 20:56:37 +02:00
|
|
|
type IPCMessage = {
|
|
|
|
[key: string]: string | boolean
|
|
|
|
_guard: string
|
|
|
|
type: string,
|
|
|
|
message: string,
|
|
|
|
header: string,
|
|
|
|
broadcast: boolean
|
|
|
|
}
|
|
|
|
|
2023-04-16 15:55:02 +02:00
|
|
|
type LogFunction = (str: string, opts?: WriteOptions) => void
|
2023-04-14 20:56:37 +02:00
|
|
|
|
|
|
|
export { WriteOptions, Shard, IPCMessage, LogFunction };
|