spierce7
01/19/2025, 11:45 PMprocess.env
is necessary, but the interop of the js
function requires a static string, so I'm not seeing how to properly access it via js interop.ephemient
01/19/2025, 11:47 PMfun getenv(name: String): String = js("process.env[name] ?? ''")
spierce7
01/20/2025, 12:39 AMfun getenv(name: String): String? {
return js("process?.env?.[name]")
}
Calls to 'js(code)' should be a single expression inside a top-level function body or a property initializer in Kotlin/Wasm.
This is just a function in a file, so I'm not seeing how we aren't meeting this criteria.ephemient
01/20/2025, 12:49 AM=
and I think ?
return doesn't workMichael Paus
01/20/2025, 9:34 AMwasmJs
😱Oleg Yukhnevich
01/20/2025, 9:42 AM