import { EventObject } from "./types.js"; /** * Asserts that the given event object is of the specified type or types. * Throws an error if the event object is not of the specified types. @example ```ts // ... entry: ({ event }) => { assertEvent(event, 'doNothing'); // event is { type: 'doNothing' } }, // ... exit: ({ event }) => { assertEvent(event, 'greet'); // event is { type: 'greet'; message: string } assertEvent(event, ['greet', 'notify']); // event is { type: 'greet'; message: string } // or { type: 'notify'; message: string; level: 'info' | 'error' } }, ``` */ export declare function assertEvent(event: TEvent, type: TAssertedType | TAssertedType[]): asserts event is TEvent & { type: TAssertedType; };