Can I import a namespace globally without explicitly calling import in each and every function?

前端 未结 1 867
故里飘歌
故里飘歌 2021-02-04 17:20

In order to avoid namespace bloating, I use packages. For example, let Foo be a function in a package called FooPackage

function Foo()
         


        
相关标签:
1条回答
  • 2021-02-04 18:18

    Maybe you could use a private directory. The functions in the private directory can be seen only by functions in its parent directory, and they can be called just by their names.

    It's not a completely satisfying solution, but that can help.

    0 讨论(0)
提交回复
热议问题