@travetto/compiler
Version:
The compiler infrastructure for the Travetto framework
7 lines (6 loc) • 319 B
text/typescript
import type { CompilerEventPayload, CompilerEventType } from '../support/types.ts';
export class EventUtil {
static sendEvent<K extends CompilerEventType, T extends CompilerEventPayload<K>>(type: K, payload: T): void {
process.connected && process.send!({ type, payload }, undefined, undefined, () => { });
}
}