JVM, JS: Use faster checks in IdePlatformKind.supportsTargetPlatform()
This commit is contained in:
@@ -34,4 +34,6 @@ object JsPlatforms {
|
||||
val allJsPlatforms: List<TargetPlatform> = listOf(defaultJsPlatform)
|
||||
}
|
||||
|
||||
// TODO: temporarily conservative implementation; use the same approach as for TargetPlatform?.isNative()
|
||||
// when JsPlatform will become parameterized with "JS target"
|
||||
fun TargetPlatform?.isJs(): Boolean = this?.singleOrNull() is JsPlatform
|
||||
|
||||
Reference in New Issue
Block a user