aardio类的例子

admin2020-12-09  1.3K+

工程的lib目录下,my_lib

namespace my_lib{

    import console

    class MyLibClass {
        ctor(...){
            ..console.log("in ctor of mylibclass");
        }
    
        my_lib_function=function(...){
            ..console.log("in my_lib_function");
            
            return "my_lib_function";
        }
    }
}

main文件中调用类

import my_lib
import console

test = my_lib.MyLibClass()
info = test.my_lib_function()
console.log(info)
console.pause()
转载请注明原文地址: http://www.aardio.net/read-35.html
最新回复(0)
aardio问答
aardio编程语言