logger/src/Types.ts

24 lines
462 B
TypeScript
Raw Normal View History

2023-06-15 12:13:46 +02:00
import EventEmitter from 'node:events';
2023-04-12 19:13:14 +02:00
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 };