/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
export const opSize = (op) => {
    // Some messages may already have string contents,
    // so stringifying them again will add inaccurate overhead.
    const content = typeof op.contents === "string" ? op.contents : JSON.stringify(op.contents) ?? "";
    const data = opHasData(op) ? op.data : "";
    return content.length + data.length;
};
const opHasData = (op) => op.data !== undefined;
//# sourceMappingURL=opProperties.js.map