```ts
export function runDecode(coded: string): string {
  if (typeof coded !== 'string') {
    throw new Error('Expected a string input.');
  }

  let decoded = '';

  for (let i = 0; i < coded.length; i++) {
    const letter = coded[i];
    const count = parseInt(coded.slice(i + 1), 10);

    if (isNaN(count) || count <= 0) {
      throw new Error('Invalid count: expected a positive integer.');
    }

    decoded += letter.repeat(count);
  }

  return decoded;
}
```