```ts
export function drawStock(shelf: Record<string, number>, order: [string, number][]): Record<string, number> {
  if (typeof shelf !== 'object' || !shelf) throw new Error('Invalid shelf');
  if (!Array.isArray(order)) throw new Error('Invalid order');

  const remainingShelf: Record<string, number> = { ...shelf };

  for (const [item, count] of order) {
    if (typeof item !== 'string') throw new Error('Invalid item name');
    if (typeof count !== 'number' || count < 0 || !Number.isInteger(count)) throw new Error('Invalid count');

    if (!remainingShelf[item]) throw new Error(`Item ${item} not found on the shelf`);
    if (count > remainingShelf[item]) throw new Error(`Cannot pull more of item ${item} than available`);

    remainingShelf[item] -= count;
  }

  return remainingShelf;
}
```