← All tips

TypeScript: prefer `interface` for public object shapes

typescriptstyle

Interfaces merge well and read clearly for APIs.

interface Tip { id: string; title: string; tags: string[] }