Private members in CoffeeScript?

后端 未结 11 2045
太阳男子
太阳男子 2020-12-12 13:37

Does somebody know how to make private, non-static members in CoffeeScript? Currently I\'m doing this, which just uses a public variable starting with an underscore to clari

11条回答
  •  不思量自难忘°
    2020-12-12 14:05

    If you want only separate private memebers from public, just wrap it in $ variable

    $:
            requirements:
                  {}
            body: null
            definitions: null
    

    and use @$.requirements

提交回复
热议问题