```ts
/** Close out a stockroom count sheet after a day's receive and issue moves. */

function parseSheet(opening: string): Map<string, number> {
  const held = new Map<string, number>();
  if (opening === "") {
    return held;
  }
  for (const part of opening.split(";")) {
    const colon = part.indexOf(":");
    if (colon < 0) {
      throw new Error(`sheet entry has no colon: ${part}`);
    }
    const name = part.slice(0, colon);
    const count = part.slice(colon + 1).trim();
    if (!/^[a-z]+$/.test(name)) {
      throw new Error(`bad item name: ${part}`);
    }
    if (count !== "" && !/^(?:0|[1-9]\d*)$/.test(count)) {
      throw new Error(`bad count: ${part}`);
    }
    if (held.has(name)) {
      throw new Error(`duplicate sheet entry: ${name}`);
    }
    held.set(name, Number(count));
  }
  return held;
}

export function closingSheet(opening: string, moves: string): string {
  if (typeof opening !== "string" || typeof moves !== "string") {
    throw new Error("closingSheet expects two strings");
  }
  const held = parseSheet(opening);
  for (const move of moves.split(";")) {
    const colon = move.indexOf("+");
    if (colon < 0 && move.indexOf("-") < 0) {
      throw new Error(`move entry has no '+' or '-': ${move}`);
    }
    const name = move.slice(0, colon);
    const qty = move.slice(colon + 1).trim();
    if (!/^[a-z]+$/.test(name)) {
      throw new Error(`bad item name: ${move}`);
    }
    if (qty === "") {
      throw new Error(`invalid quantity for item ${name}: ${move}`);
    }
    if (!/^(?:0|[1-9]\d*)$/.test(qty)) {
      throw new Error(`invalid quantity for item ${name}: ${move}`);
    }
    const qtyNum = Number(qty);
    if (held.has(name) && held.get(name) < qtyNum) {
      throw new Error(`cannot issue ${qty} of item ${name}, only ${held.get(name)} on hand`);
    }
    held.set(name, (held.get(name) || 0) + qtyNum);
  }
  const entries: string[] = [];
  for (const [name, count] of [...held.entries()].sort((a, b) => a[0].localeCompare(b[0]))) {
    if (count > 0) {
      entries.push(`${name}:${count}`);
    }
  }
  return entries.join(";");
}
```