UNPKG

852 BTypeScriptView Raw
1import { StompHeaders } from './stomp-headers.js';
2/**
3 * It represents a STOMP frame. Many of the callbacks pass an IFrame received from
4 * the STOMP broker. For advanced usage you might need to access [headers]{@link IFrame#headers}.
5 *
6 * Part of `@stomp/stompjs`.
7 *
8 * {@link IMessage} is an extended IFrame.
9 */
10export interface IFrame {
11 /**
12 * STOMP Command
13 */
14 command: string;
15 /**
16 * Headers, key value pairs.
17 */
18 headers: StompHeaders;
19 /**
20 * Is this frame binary (based on whether body/binaryBody was passed when creating this frame).
21 */
22 isBinaryBody: boolean;
23 /**
24 * body of the frame as string
25 */
26 readonly body: string;
27 /**
28 * body as Uint8Array
29 */
30 readonly binaryBody: Uint8Array;
31}
32/**
33 * Alias for {@link IFrame}
34 */
35export declare type Frame = IFrame;