I'm an idiot
# javascript
a
I'm an idiot
In my attempts to befriend Typescript, webpack, and Kotlin, I had a leftover
@file:JsModule
which I thought was related to what was exported and under which name.
new Kotlin Javascript project, AMD module type
Copy code
@file:JsModule("kjs3")

fun demofun():Double {
    return Math.PI
}
Error:(3, 1) Kotlin: Cant put non-external declarations in file marked with {0} annotation
Error:(4, 9) Kotlin: Unresolved reference: Math
IntelliJ IDEA 2017.1 EAP
Build #IU-171.2613.7, built on January 25, 2017
Information: Kotlin: Kotlin Compiler version 1.1.0-beta-38
Works without
@file:JsModule("modulename")
h
In my attempts to befriend Typescript, webpack, and Kotlin
why people even use webpack?
I'm all hands for new tech but I want to know the motivation
b
JsModule
affects only external declarations, so file annotated by it can’t contain non-external declarations