async function calculateHighlights(recipeConfig, direction, pos) {
    pos = await self.chef.calculateHighlights(recipeConfig, direction, pos);

    self.postMessage({
        action: "highlightsCalculated",
        data: pos
    });
}
Calculates highlight offsets if possible.

@param {Object[]} recipeConfig
@param {string} direction
@param {Object[]} pos - The position object for the highlight.
@param {number} pos.start - The start offset.
@param {number} pos.end - The end offset.