Revert "JS: remove -XtypedArraysEnabled flag (always true now)"
This reverts commit 4a5e9bb
This commit is contained in:
+6
@@ -67,4 +67,10 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
* Default value: "v5"
|
||||
*/
|
||||
var target: kotlin.String
|
||||
|
||||
/**
|
||||
* Translate primitive arrays to JS typed arrays
|
||||
* Default value: true
|
||||
*/
|
||||
var typedArrays: kotlin.Boolean
|
||||
}
|
||||
|
||||
+7
@@ -79,6 +79,11 @@ internal abstract class KotlinJsOptionsBase : org.jetbrains.kotlin.gradle.dsl.Ko
|
||||
get() = targetField ?: "v5"
|
||||
set(value) { targetField = value }
|
||||
|
||||
private var typedArraysField: kotlin.Boolean? = null
|
||||
override var typedArrays: kotlin.Boolean
|
||||
get() = typedArraysField ?: true
|
||||
set(value) { typedArraysField = value }
|
||||
|
||||
internal open fun updateArguments(args: org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments) {
|
||||
allWarningsAsErrorsField?.let { args.allWarningsAsErrors = it }
|
||||
suppressWarningsField?.let { args.suppressWarnings = it }
|
||||
@@ -95,6 +100,7 @@ internal abstract class KotlinJsOptionsBase : org.jetbrains.kotlin.gradle.dsl.Ko
|
||||
sourceMapEmbedSourcesField?.let { args.sourceMapEmbedSources = it }
|
||||
sourceMapPrefixField?.let { args.sourceMapPrefix = it }
|
||||
targetField?.let { args.target = it }
|
||||
typedArraysField?.let { args.typedArrays = it }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,4 +120,5 @@ internal fun org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments.fil
|
||||
sourceMapEmbedSources = null
|
||||
sourceMapPrefix = null
|
||||
target = "v5"
|
||||
typedArrays = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user