JavaScript annotations

后端 未结 2 1250
醉酒成梦
醉酒成梦 2021-01-30 17:02

Are there JavaScript annotations?

Of course JavaScript doesn\'t have them, but are there additional libraries or proposed language extension, for exampl

2条回答
  •  情话喂你
    2021-01-30 17:20

    I know this is old. But ES2016 provides decorators (is it called decorators in Javascript). It is easy to make your own decorators, or you can extend my decorator module that let you easily wrap/inject your custom code.

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

提交回复
热议问题