While working on annnotations, I thought about how TypeScript Interfaces could be valuable for validating js objects like an annotation itself.
TS's Interface can be thought of in analogy to PropTypes, but Interfaces can be applied everywhere, they don't work during run- but compile-time and are tightly integrated with VSCode's TS features.
So looking at the spec of the annotation format here, an Interface for an annotation can look like this:
export interface Annotation {