Typescript: "excessive stack depth comparing types" warning

Example:

type RecursiveType = RecursiveType[];
This error is raised when TypeScript encounters recursive type definitions.

Solution:

// Avoid recursive type definitions or use type guards.

Beginner's Guide to TypeScript