Add explicit imports of kotlin.js.* to generated files.
This commit is contained in:
@@ -8,6 +8,7 @@ package kotlin.collections
|
|||||||
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import kotlin.comparisons.*
|
import kotlin.comparisons.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ package kotlin.collections
|
|||||||
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import kotlin.comparisons.*
|
import kotlin.comparisons.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ package kotlin.comparisons
|
|||||||
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import kotlin.comparisons.*
|
import kotlin.comparisons.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ package kotlin.collections
|
|||||||
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import kotlin.comparisons.*
|
import kotlin.comparisons.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ package kotlin.ranges
|
|||||||
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import kotlin.comparisons.*
|
import kotlin.comparisons.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ package kotlin.sequences
|
|||||||
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import kotlin.comparisons.*
|
import kotlin.comparisons.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ package kotlin.collections
|
|||||||
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import kotlin.comparisons.*
|
import kotlin.comparisons.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ package kotlin.text
|
|||||||
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import kotlin.comparisons.*
|
import kotlin.comparisons.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
package org.khronos.webgl
|
package org.khronos.webgl
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import org.w3c.dom.*
|
import org.w3c.dom.*
|
||||||
import org.w3c.dom.css.*
|
import org.w3c.dom.css.*
|
||||||
import org.w3c.dom.events.*
|
import org.w3c.dom.events.*
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
package org.w3c.dom.css
|
package org.w3c.dom.css
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import org.khronos.webgl.*
|
import org.khronos.webgl.*
|
||||||
import org.w3c.dom.*
|
import org.w3c.dom.*
|
||||||
import org.w3c.dom.events.*
|
import org.w3c.dom.events.*
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
package org.w3c.dom.events
|
package org.w3c.dom.events
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import org.khronos.webgl.*
|
import org.khronos.webgl.*
|
||||||
import org.w3c.dom.*
|
import org.w3c.dom.*
|
||||||
import org.w3c.dom.css.*
|
import org.w3c.dom.css.*
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
package org.w3c.dom
|
package org.w3c.dom
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import org.khronos.webgl.*
|
import org.khronos.webgl.*
|
||||||
import org.w3c.dom.css.*
|
import org.w3c.dom.css.*
|
||||||
import org.w3c.dom.events.*
|
import org.w3c.dom.events.*
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
package org.w3c.dom.parsing
|
package org.w3c.dom.parsing
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import org.khronos.webgl.*
|
import org.khronos.webgl.*
|
||||||
import org.w3c.dom.*
|
import org.w3c.dom.*
|
||||||
import org.w3c.dom.css.*
|
import org.w3c.dom.css.*
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
package org.w3c.dom.svg
|
package org.w3c.dom.svg
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import org.khronos.webgl.*
|
import org.khronos.webgl.*
|
||||||
import org.w3c.dom.*
|
import org.w3c.dom.*
|
||||||
import org.w3c.dom.css.*
|
import org.w3c.dom.css.*
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
package org.w3c.dom.url
|
package org.w3c.dom.url
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import org.khronos.webgl.*
|
import org.khronos.webgl.*
|
||||||
import org.w3c.dom.*
|
import org.w3c.dom.*
|
||||||
import org.w3c.dom.css.*
|
import org.w3c.dom.css.*
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
package org.w3c.fetch
|
package org.w3c.fetch
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import org.khronos.webgl.*
|
import org.khronos.webgl.*
|
||||||
import org.w3c.dom.*
|
import org.w3c.dom.*
|
||||||
import org.w3c.dom.css.*
|
import org.w3c.dom.css.*
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
package org.w3c.files
|
package org.w3c.files
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import org.khronos.webgl.*
|
import org.khronos.webgl.*
|
||||||
import org.w3c.dom.*
|
import org.w3c.dom.*
|
||||||
import org.w3c.dom.css.*
|
import org.w3c.dom.css.*
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
package org.w3c.notifications
|
package org.w3c.notifications
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import org.khronos.webgl.*
|
import org.khronos.webgl.*
|
||||||
import org.w3c.dom.*
|
import org.w3c.dom.*
|
||||||
import org.w3c.dom.css.*
|
import org.w3c.dom.css.*
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
package org.w3c.performance
|
package org.w3c.performance
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import org.khronos.webgl.*
|
import org.khronos.webgl.*
|
||||||
import org.w3c.dom.*
|
import org.w3c.dom.*
|
||||||
import org.w3c.dom.css.*
|
import org.w3c.dom.css.*
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
package org.w3c.workers
|
package org.w3c.workers
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import org.khronos.webgl.*
|
import org.khronos.webgl.*
|
||||||
import org.w3c.dom.*
|
import org.w3c.dom.*
|
||||||
import org.w3c.dom.css.*
|
import org.w3c.dom.css.*
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
package org.w3c.xhr
|
package org.w3c.xhr
|
||||||
|
|
||||||
|
import kotlin.js.*
|
||||||
import org.khronos.webgl.*
|
import org.khronos.webgl.*
|
||||||
import org.w3c.dom.*
|
import org.w3c.dom.*
|
||||||
import org.w3c.dom.css.*
|
import org.w3c.dom.css.*
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ fun main(args: Array<String>) {
|
|||||||
w.appendln("package $pkg")
|
w.appendln("package $pkg")
|
||||||
w.appendln()
|
w.appendln()
|
||||||
|
|
||||||
|
w.appendln("import kotlin.js.*")
|
||||||
allPackages.filter { it != pkg }.forEach { import ->
|
allPackages.filter { it != pkg }.forEach { import ->
|
||||||
w.appendln("import $import.*")
|
w.appendln("import $import.*")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,6 +99,9 @@ private fun List<ConcreteFunction>.writeTo(file: File, sourceFile: SourceFile, p
|
|||||||
|
|
||||||
writer.append("package ${sourceFile.packageName ?: "kotlin"}\n\n")
|
writer.append("package ${sourceFile.packageName ?: "kotlin"}\n\n")
|
||||||
writer.append("$COMMON_AUTOGENERATED_WARNING\n\n")
|
writer.append("$COMMON_AUTOGENERATED_WARNING\n\n")
|
||||||
|
if (platform == Platform.JS) {
|
||||||
|
writer.appendln("import kotlin.js.*")
|
||||||
|
}
|
||||||
writer.append("import kotlin.comparisons.*\n\n")
|
writer.append("import kotlin.comparisons.*\n\n")
|
||||||
|
|
||||||
for (f in this) {
|
for (f in this) {
|
||||||
|
|||||||
Reference in New Issue
Block a user