```typescript
/**
 * The KEY=VALUE pairs of a config file.
 */
export function parseConfig(text: string): Record<string, string> {
  const configRecord: Record<string, string> = {};
  for (const line of text.split("\n")) {
    if (!line.trim()) continue;
    if (line.startsWith("#")) continue;
    let [key, value] = line.trim().split("=", 2);
    key = key.trim();
    value = value.trim();
    configRecord[key] = value;
  }
  return configRecord;
}
```