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