runjorel
03/13/2018, 2:44 AM@JsModule("express")
external object express {
@JsName("call")
operator fun invoke(): Application
fun Router(): Router
}
allows you to do this in kotlinjs:
val router = express.Router()
val app = express()
konsoletyper
03/13/2018, 8:35 AM@JsModule("express")
external object express {
fun Router(): Router
}
@JsModule("express")
external fun express(): Application
runjorel
03/13/2018, 2:18 PMclass
with a companion object
that held Router
etc. but at that point I couldn’t have class
and function
with the same name. However under this setup having an object
and fun
with the same presents no issue.