export declare type BasePostMessageCallbackProps = { onMessage?: (message: T) => void; onInvalidMessageError?: (message: T, error: Error) => void; }; export declare class PostMessageFieldDecodeError extends Error { messageType: string; field: string; expectedType: TypeDef; gotValue: unknown; constructor(messageType: string, field: string, expectedType: TypeDef, gotValue: unknown); } export declare class PostMessageUnknownTypeError extends Error { postMessageType: string; constructor(postMessageType: string); } export declare type MessageEventData = { mx?: boolean; metadata?: Metadata; type?: string; }; declare type FieldProperties = { optional?: boolean; }; export declare type Value = string | number | boolean; export declare type NestedValue = Record; export declare type Metadata = Record; export declare type TypeDef = string | Array | Record; export declare function assertMessageProp(container: Metadata, postMessageType: string, field: string, expectedType: TypeDef, properties?: FieldProperties): void; export {};