```
export function parseConfig(text: string): Record<string, string> {
  const config: Record<string, string> = {};
  for (const line of text.split("\n")) {
    if (!line.trim() || line.trim().startsWith("#")) continue;
    const [key, value] = line.trim().split("=", 2);
    if (!key) throw new Error(`Line ${lineNumber}: Empty key`);
    config[key.trim()] = value || "";
  }
  return config;
}

function parseConfig(text: string): Record<string, string> {
  const config: Record<string, string> = {};
  for (const [lineNumber, line] of text.split("\n").entries()) {
    if (!line.trim() || line.trim().startsWith("#")) continue;
    const [key, value] = line.trim().split("=", 2);
    if (!key) throw new Error(`Line ${lineNumber + 1}: Empty key`);
    config[key.trim()] = value || "";
  }
  return config;
}
```