DEDUPED Hot AI repos, turned into use cases Get the Monday 5

How to catch broken SQL in tsc before it ships with Reylo

Type-check SQL against your dev database so a dropped table or misspelled column fails the build.

Short answer: Add a typecheck script: tsc --noEmit --runExternalCode, which lets tsc run content mappers; then point DATABASE_URL at a dev database that has your current schema; run the typecheck locally and in CI after every migration. All steps.

Who it is forA team that has shipped a renamed column to production because nothing checked the queries.

The problemSQL in strings or files is invisible to the type checker, so schema changes break at run time.

The outcomeA typecheck script that reports a misspelled column, a wrong parameter or a dropped table as a type error.

What you need first

  • TypeScript 7.1 (currently in beta), the first release with content mappers
  • Node 24 or later
  • A running dev database: Postgres, MySQL 8.0.22 or later, or a SQLite file
  • A supported driver such as pg, postgres.js, mysql2, better-sqlite3, Bun.sql or Cloudflare D1

Steps

  1. Add a typecheck script: tsc --noEmit --runExternalCode, which lets tsc run content mappers
  2. Point DATABASE_URL at a dev database that has your current schema
  3. Run the typecheck locally and in CI after every migration
  4. Set up your editor from the Reylo docs to see the same errors as you type

Prompt for your agent

In <project>, add a typecheck script that runs tsc with --noEmit --runExternalCode against the dev database in DATABASE_URL. Then rename <column> in a scratch migration and show me every .sql query and caller that now fails.

Caveat. --runExternalCode lets tsc execute content mapper code, and CI needs access to a database with the current schema.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for colinhacks/reylo and "Catch broken SQL in tsc before it ships"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer