```ts
/** The KEY=VALUE pairs of a config file. */
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 index = line.indexOf("=");
    if (index === -1) throw new Error(`Line with no '=': ${line}`);
    const key = line.slice(0, index).trim();
    if (key === "__proto__") throw new Error("Reserved keyword as key");
    const value = line.slice(index + 1).trim();
    config[key] = value;
  }
  return config;
}
```