Optional Type Annotations

Back to Gradual Typing

Type annotations that are not required but can be added incrementally. Unannotated code behaves dynamically, while annotated code benefits from static checking. This enables gradual migration from dynamic to static typing in existing codebases (e.g., TypeScript’s any type, Python’s type hints).

type-systems gradual annotations