export type Config = { host: string; port: number; debug: boolean; timeoutMs?: number; tags: string[];};export type ConfigErrorKind = "missing" | "wrong_type" | "out_of_range";export class ConfigError extends Error { constructor( public readonly kind: ConfigErrorKind, public readonly field: string, ) { super(`${kind}: ${field}`); }}/** Throws ConfigError on invalid input. */export function parseConfig(raw: Record<string, unknown>): Config { // TODO}