Bernhard
03/24/2026, 9:24 AMBernhard
03/24/2026, 9:25 AMturansky
03/24/2026, 11:27 AMturansky
03/24/2026, 11:32 AMBernhard
03/24/2026, 11:33 AMBernhard
03/24/2026, 11:36 AMBernhard
03/24/2026, 11:38 AMBernhard
03/24/2026, 11:38 AMBernhard
03/24/2026, 11:39 AMturansky
03/24/2026, 12:01 PMkotlin.js.JsNumberBernhard
03/24/2026, 12:07 PMturansky
03/24/2026, 12:11 PMBernhard
03/24/2026, 12:12 PM[versions]
kotlin = "2.3.20"
coroutines = "1.10.2"
schema-validator = "0.5.4"
ktor = "2.3.12"
serialization = "1.10.0"
[libraries]
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization" }
kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "serialization" }
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version = "0.7.1" }
kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
kotlinx-html = { module = "org.jetbrains.kotlinx:kotlinx-html-js", version = "0.12.0" }
kotlin-wrappers = { module = "org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom", version = "2026.3.15" }
kotlin-plain-objects = { module = "org.jetbrains.kotlin:kotlin-js-plain-objects", version.ref = "kotlin" }
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
kotlin-wrappers-js = { module = "org.jetbrains.kotlin-wrappers:kotlin-js" }
kotlin-wrappers-web = { module = "org.jetbrains.kotlin-wrappers:kotlin-web" }
kotlin-test-js = { module = "org.jetbrains.kotlin:kotlin-test-js-runner", version = "2.0.21" }
kotlinx-coroutines-js = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core-js", version.ref = "coroutines" }
jsonschemavalidator = { module = "io.github.optimumcode:json-schema-validator", version.ref = "schema-validator" }
jsonschemavalidator-js = { module = "io.github.optimumcode:json-schema-validator-js", version.ref = "schema-validator" }
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
ktor-client-negotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" }
ktor-client-json = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" }
ktor-client-logging = { module = "io.ktor:ktor-client-logging", version.ref = "ktor" }
ktor-client-java = { module = "io.ktor:ktor-client-java", version.ref = "ktor" }
logback = { module = "ch.qos.logback:logback-classic", version = "1.5.8" }
jsoup = { module = "org.jsoup:jsoup", version = "1.19.1" }
[plugins]
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kotlin-plain-objects = { id = "org.jetbrains.kotlin.plugin.js-plain-objects", version.ref = "kotlin" }
versions = { id = "com.github.ben-manes.versions", version = "0.53.0" }
download = { id = "de.undercouch.download", version = "5.7.0" }Bernhard
03/24/2026, 12:13 PMturansky
03/24/2026, 1:12 PMBernhard
03/24/2026, 1:34 PMturansky
03/24/2026, 1:36 PMBernhard
03/24/2026, 1:39 PMturansky
03/24/2026, 1:40 PMjs.core.JsNumber was removed, because it was required as namespace onlyturansky
03/24/2026, 1:40 PMBernhard
03/24/2026, 1:40 PMBernhard
03/24/2026, 1:41 PMturansky
03/24/2026, 1:41 PMBernhard
03/24/2026, 1:41 PMsettings.register('key', {type: Number, default: 0})turansky
03/24/2026, 1:42 PMBernhard
03/24/2026, 1:42 PMturansky
03/24/2026, 1:42 PMDouble::class.js ?Bernhard
03/24/2026, 1:43 PMBernhard
03/24/2026, 1:43 PMUncaught (in promise) ReferenceError: Double is not defined
registerInt Pfrpg2eKingdomCampingWeatherSettings.kt:63
t3q Pfrpg2eKingdomCampingWeatherSettings.kt:316
s3q Main.kt:93
xb GeneratorCoroutineImpl.kt:31
rb GeneratorCoroutineImpl.kt:59
sb main.js:76297
o15 Continuation.kt:45
b1b JSDispatcher.kt:127
lambda JSDispatcher.kt:55
promise callback*c1b JSDispatcher.kt:55
f1b JSDispatcher.kt:118
y15 JSDispatcher.kt:56
safeDispatch DispatchedContinuation.kt:254
dispatch DispatchedTask.kt:145
dispatchResume CancellableContinuationImpl.kt:470
h15 CancellableContinuationImpl.kt:504
g15 main.js:90699
sb CancellableContinuationImpl.kt:359
lambda Continuation.kt:45
promise callback*./kotlin/kotlinx-coroutines-core.mjs/await_0/< Promise.kt:64
xb GeneratorCoroutineImpl.kt:40
rb GeneratorCoroutineImpl.kt:59
sb main.js:76297
o15 Continuation.kt:45
b1b JSDispatcher.kt:127
lambda JSDispatcher.kt:55
promise callback*c1b JSDispatcher.kt:55
f1b JSDispatcher.kt:118
y15 JSDispatcher.kt:56
safeDispatch DispatchedContinuation.kt:254
resumeCancellableWith DispatchedContinuation.kt:211
startCoroutineCancellable_0 Cancellable.kt:26
s10 CoroutineStart.kt:358
p10 AbstractCoroutine.kt:134
async Builders.common.kt:88
promise Promise.kt:26
buildPromise Lang.kt:39
lambda Main.kt:91
#call foundry.mjs:23832
callAll foundry.mjs:23791
initialize foundry.mjs:167566
initialize foundry.mjs:169017
<anonymous> foundry.mjs:181096
async*Bernhard
03/24/2026, 1:43 PMturansky
03/24/2026, 1:52 PMpackage js.numbers
@JsName("Number")
val NumberClass: JsClass<JsNumber>
PR? 😉Bernhard
03/24/2026, 1:55 PMBernhard
03/24/2026, 4:32 PM@JsName("Number")
private external class JsNumber :
Localizable<NumberFormatOptions> {
constructor(value: Int)
constructor(value: Double)
fun toExponential(fractionDigits: Int = definedExternally): String
fun toFixed(digits: Int = definedExternally): String
fun toPrecision(precision: Int = definedExternally): String
}Bernhard
03/24/2026, 4:32 PMBernhard
03/24/2026, 4:32 PM@JsName("Number")
external class JsNumber
in my project and got it working, so looks to me like I'd just remove the private modifier?turansky
03/24/2026, 4:34 PMJsClass only, right?Bernhard
03/24/2026, 4:36 PM@JsName("Number")
val NumberClass: JsClass<JsNumber>
needs to be initializedturansky
03/24/2026, 4:37 PMBernhard
03/24/2026, 4:37 PMBernhard
03/24/2026, 4:37 PMBernhard
03/24/2026, 4:38 PMturansky
03/24/2026, 4:38 PMturansky
03/24/2026, 4:38 PMBernhard
03/24/2026, 4:38 PMturansky
03/24/2026, 4:39 PMJsNumberBernhard
03/24/2026, 4:39 PMBernhard
03/24/2026, 4:39 PM@JsName("Number")
external val NumberClass: JsClass<kotlin.js.JsNumber>Bernhard
03/24/2026, 4:39 PMBernhard
03/24/2026, 4:40 PMBernhard
03/24/2026, 4:41 PMBernhard
03/24/2026, 4:42 PMBernhard
03/24/2026, 4:46 PMturansky
03/24/2026, 5:07 PMtbh maybe JsNumber::class.js from the base js lib itself should point to the correct platform typeIt's alias of
Double 😉turansky
03/24/2026, 5:09 PMmaybe the best way forward is to not create a PR but to discuss this in the Kotlin issue tracker@Artem Kobzar is there any reason why
Double::class.js call fails/doesn't return Number ?turansky
03/24/2026, 5:10 PMBernhard
03/25/2026, 8:58 AMturansky
03/25/2026, 1:48 PMArtem Kobzar
03/27/2026, 5:52 PMval kClass = Double::class
kClass.js // Should be NumberArtem Kobzar
03/27/2026, 5:55 PMBernhard
03/30/2026, 8:15 AMArtem Kobzar
03/30/2026, 9:47 AM