Is their JavaScript annotation library?

Do they have a good open source JavaScript library that reads annotations specific to JavaScript function and variables? Like in Java.

+4
source share
2 answers

Yes, there is now - although they require your javascript to compile.

This SO answer covers the same topic: JavaScript annotations

It has some interesting thoughts on how you can implement the variation of annotations yourself.

Remarkably, it refers to the Closure Compiler , which uses annotations - although it manages to do this because it is compiled.

In addition, node.js (on the server side of javascript) has npm for annotating docblock style .

+1
source

Well in ES2016 you can use the same decorator template. I created a module that makes it easy to wrap / paste the source code with my own.

https://github.com/cmartin81/decorator-wrap

0
source

Source: https://habr.com/ru/post/1485586/


All Articles