```typescript
export function baseAmount(amount: number, unit: string, defs: Record<string, [number, string]>, base: string): number {
  if (amount < 0 || !Number.isInteger(amount)) {
    throw new Error("Amount must be a non-negative whole number");
  }
  if (!defs[unit]) {
    throw new Error(`Unit ${unit} is not defined`);
  }
  const [factor, finer] = defs[unit];
  if (factor <= 0) {
    throw new Error("Factor must be a positive whole number");
  }

  let currentAmount = amount;
  let currentUnit = unit;

  while (currentUnit !== base) {
    const definition = defs[currentUnit];
    if (!definition) {
      throw new Error(`Chain loops for unit ${currentUnit}`);
    }
    const [nextFactor, nextFiner] = definition;
    if (nextFactor <= 0) {
      throw new Error("Factor must be a positive whole number");
    }

    currentAmount *= nextFactor;
    currentUnit = nextFiner;
  }

  return currentAmount;
}
```