@beerwright/core
    Preparing search index...

    Interface DecoctionIssue

    One problem with a decoction, as structured data.

    error means the pull as specified can't happen, and the numbers next to it are only arithmetic, not advice. warning means it can happen but probably shouldn't. note means it will happen and there's something the brewer should know. Callers sort by severity. decoctionWarnings flattens issues into the string list RecipeCalculation.warnings takes.

    interface DecoctionIssue {
        code: DecoctionIssueCode;
        message: string;
        quantities?: Readonly<Record<string, DecoctionQuantity>>;
        severity: "error" | "warning" | "note";
        short: string;
        template?: string;
    }
    Index

    Which problem this is.

    message: string

    What's wrong and what to do about it, as a full sentence.

    Some messages run past a hundred characters, which is too long for a table cell. Use short there.

    quantities?: Readonly<Record<string, DecoctionQuantity>>

    The numbers that fill template's placeholders, canonical and unrounded.

    Keyed by placeholder name. They're canonical because the rest of the package uses canonical units and a display layer needs them as input. The litres in message are rendered from these.

    severity: "error" | "warning" | "note"

    How serious it is: error, warning or note, as described above.

    short: string

    The same problem in a few words, for places with no room, such as a table cell.

    Truncating message would cut it off partway through the advice, which is the part that tells the brewer what to do. So short says what's wrong and message says what to do.

    template?: string

    message with each of its numbers replaced by a {name} placeholder naming an entry in quantities.

    Set on every issue that quotes a measurement, and absent on the ones that quote a percentage, a number of minutes or no number at all. A caller that shows gallons instead of litres renders this with renderDecoctionIssue. Anything else can use message as it is.