Is there any way to mark a function as throwing in...
# javascript
b
Is there any way to mark a function as throwing in Kotlin/JS?
b
Do you mean checked exception like in Java?
b
Yes, so I can write a library and know, when I use it, which functions throw and which ones don’t.
b
No, Kotlin doesn’t have checked exceptions
b
Yes, I'm aware... I made a proposal to fix that but it was rejected. In the meantime I've been using the
@Throws
annotation in Kotlin/JVM, but there doesn't seem to be an analog in Kotlin/JS