```ts
/** A store with every value starred out. */
export function hideValues(
  store: Record<string, string>,
): Record<string, string> {
  const hidden: Record<string, string> = {};
  for (const key of Object.keys(store)) {
    hidden["*".repeat(store[key].length)] = store[key];
  }
  return hidden;
}
```

The bug was that the function used `key.length` (the length of the *key*) to determine the number of stars, instead of `store[key].length` (the length of the *value* being hidden). This caused every value to be starred out with a number of stars equal to its key's length, rather than its own value's length. The fix replaces `key.length` with `store[key].length`.