Rebasely Beta: data may be purged

justintypescript-ultra-strict Public

TypeScript · 23 lines · 494 B · at 358de06

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}