footnote
Annotation utilities for JavaScript. Designed to be generally compatible with angular and TypeScript annotations.
npm install --save footnote
Usage
Create annotation decorators using Annotation.create
:
; { return Annotation ;} { return Annotation;}
And use them:
@SimpleAnnotation @ {} {}ES5Classprototype {};;ES5Classprototype 'foo' Object;// Or treating it as a function:ES5Classprototypefoo; // The following would work the same for `ES5Class`:const annotations = Annotation;console; // array[1]console; // trueconst fooAnnotations = Annotation;console; // trueconsole; // 'x' // Also supports functions and composes:const f = ;const fnAnnotations = Annotation;console; // 2console; // 'y'console; // 'ok'