CommonJS Nested modules

When using nested external JS-modules, do I have to nest the description in kotlin as well or is there another way?

@JsModule("externalLibraray")
external object Library {
    val someValue: dynamic

    class PartOfLibrary(arg: String) {
       fun someFn()
    }
}

I want to either say new Library.PartOfLibrary() or import PartOfLibrary directly.

Related question: is there a way of generating JS-library-“stubs” for kotlin?