Implement hostOs detection for web target (#738)
* Implement hostOs detection for web target * Refactor hostOs initialization in OsArch.js.kt Instead of using a lazy initialization, this change allows immediate initialization. * Deprecate incorrect enum OS.JS value in OsArch.kt Deprecation annotation has been added to JS enum in OsArch. This is done as 'JS' is not a valid host OS name. Added 'Unknown' enum for undefined or unknown cases to handle from now on. Consider using enum 'KotlinBackend' to detect JS. * Deprecate invalid Arch values and modify hostArch The Arch values 'JS' and 'WASM' were deprecated as they were found to be invalid. An 'Unknown' value was introduced to accommodate for unforeseen cases in the future. The 'hostArch' value under 'OsArch.js.kt' has been updated accordingly to use this new 'Unknown' value. * Add OS.Unknown to `when` expressions to make them exhaustive
Showing
Please register or sign in to comment