```typescript
/**
 * Parsed configuration from a text string.
 */
export function parseConfig(text: string): Record<string, string> {
  const config: Record<string, string> = {};
  for (const line of text.split("\n").filter(Boolean)) {
    if (!line.trim().startsWith('#')) {
      const [key, value] = line.trim().split('=', 2);
      if (!value) {
        throw new Error(`Missing value for key: ${line}`);
      }
      config[key] = value;
    }
  }
  return config;
}
```