```ts
export function runDecode(coded: string): string {
  if (typeof coded !== 'string') {
    throw new Error('Input must be a string');
  }

  let decoded = '';
  for (let i = 0; i < coded.length; i++) {
    const letter = coded[i];
    const countStr = coded.slice(i + 1);
    if (!countStr) {
      decoded += letter;
      continue;
    }

    const count = parseInt(countStr, 10);
    if (isNaN(count)) {
      throw new Error('Invalid count');
    }

    for (let j = 0; j < count; j++) {
      decoded += letter;
    }
  }

  return decoded;
}
```