async function getDishAs(data) {
    const value = await self.chef.getDishAs(data.dish, data.type);
    const transferable = (data.type === "ArrayBuffer") ? [value] : undefined;
    self.postMessage({
        action: "dishReturned",
        data: {
            value: value,
            id: data.id
        }
    }, transferable);
}
Translates the dish to a given type.