Ported AnnotationLayer to TypeScript