mirror of
https://github.com/InsanusMokrassar/KSLog.git
synced 2026-06-11 22:06:25 +00:00
a lot of changes and improvements
This commit is contained in:
24
src/jsMain/kotlin/ExtendedConsole.kt
Normal file
24
src/jsMain/kotlin/ExtendedConsole.kt
Normal file
@@ -0,0 +1,24 @@
|
||||
package dev.inmo.kslog.common
|
||||
|
||||
import kotlin.js.Console
|
||||
|
||||
external interface ExtendedConsole : Console {
|
||||
fun trace()
|
||||
fun debug(vararg o: Any?)
|
||||
fun assert(vararg o: Any?)
|
||||
}
|
||||
|
||||
/**
|
||||
* [https://developer.mozilla.org/en-US/docs/Web/API/console/debug_static](https://developer.mozilla.org/en-US/docs/Web/API/console/debug_static)
|
||||
*/
|
||||
fun Console.debug(vararg args: Any?) = unsafeCast<ExtendedConsole>().debug(*args)
|
||||
|
||||
/**
|
||||
* [https://developer.mozilla.org/en-US/docs/Web/APtraceI/console/assert_static](https://developer.mozilla.org/en-US/docs/Web/API/console/assert_static)
|
||||
*/
|
||||
fun Console.assert(vararg args: Any?) = unsafeCast<ExtendedConsole>().assert(*args)
|
||||
|
||||
/**
|
||||
* [https://developer.mozilla.org/en-US/docs/Web/API/console/trace_static](https://developer.mozilla.org/en-US/docs/Web/API/console/trace_static)
|
||||
*/
|
||||
fun Console.trace() = unsafeCast<ExtendedConsole>().trace()
|
||||
Reference in New Issue
Block a user