/*!
 * Copyright (C) Microsoft Corporation. All rights reserved.
 */
/** Status codes for plugin call responses. */
export const PluginCallStatus = {
    Pending: 0,
    Success: 1,
    Error: 2,
};
/** Type guard for InitWithPortMessage. */
export function isInitWithPortMessage(data) {
    if (typeof data !== 'object' || data === null) {
        return false;
    }
    const msg = data;
    return msg.messageType === 'initCommunicationWithPort' && typeof msg.instanceId === 'string';
}
/** Type guard for PluginCallMessage. */
export function isPluginCallMessage(data) {
    if (typeof data !== 'object' || data === null) {
        return false;
    }
    const msg = data;
    return (msg.isPluginCall === true &&
        typeof msg.callbackId === 'string' &&
        typeof msg.action === 'string' &&
        Array.isArray(msg.actionArgs));
}
//# sourceMappingURL=MessageProtocol.js.map