Waddler types

This guide assumes familiarity with:

Waddler sql template lets you define result return types:

const result = await sql<{ id: number, name: string }>`select * from "users"`;

// or
type User = { id: number, name: string };
const result: User[] = await sql<User>`select * from "users"`;

result[0].id; // ✓ works
result[0].name; // ✓ works

result[0].unknown;
// ^ TS error