Skip to content
Andrei Kurosh edited this page Aug 29, 2026 · 1 revision

Functions returning Task or Task<T> can use await inside their bodies:

fun delay:Task (time:int) ->
    println "before"
    await Task::Delay time
    println "after"

It's also possible to use await in the script's top level.

Clone this wiki locally