typescript-interface-vs-type

Installation
SKILL.md

TypeScript: Interface vs Type

Goal

Use interface until type features are needed. Prefer readable errors and compiler performance.

Rules

  • Use interface for object type definitions.
  • Use interface extends for extending object shapes.
  • Use interface for class contracts.
  • Use type for unions, tuples, primitives, mapped types, conditional types, and function aliases.
  • Prefer interface extends over object intersections.
  • Avoid intersections when properties may conflict.

Examples

Installs
15
GitHub Stars
7
First Seen
May 4, 2026
typescript-interface-vs-type — flpbalada/fb-skills