PROMPT
Write a TypeScript module in a file named exactly `config.ts`. It must export a function `parseConfig(input: unknown): Config` and an interface `Config { host: string; port: number; tls: boolean }`. `parseConfig` validates at runtime that `input` is an object with those three fields of the right types, and throws an `Error` otherwise. Return the typed `Config` on success. Write only `config.ts`. Do not write tests. Do not add a build config.
fill the variables
This prompt has 1 variable. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.
{host: string; port: number; tls: boolean}
Unlock with Pro →when to use it
Community prompt sourced from the open-source GitHub repo christopherlouet/claude-base (MIT). A "PROMPT" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
codingcommunitydeveloper
source
christopherlouet/claude-base · MIT
more in Coding
Coding✓ tested
Senior code review (strict mode)
senior staff engineer running a merciless but fair review
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions