JVM, JS: Use faster checks in IdePlatformKind.supportsTargetPlatform()

This commit is contained in:
Dmitriy Dolovov
2020-04-02 14:13:55 +07:00
parent 0f60b5a71e
commit 76b0e7994b
4 changed files with 15 additions and 9 deletions
@@ -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