+* `Promise{T}` is a Javascript-only type used to annotate the return type of an `async` host function (which returns a `Promise` resolving to `T`). The compiler uses it to track function "color": any Alan function that calls something returning a `Promise{T}` is automatically inferred to be `async`, and the necessary `await`s are emitted in the generated Javascript. It is *transparent* in pure Alan code — a function body that awaits has an actual return type of `Promise{T}`, but a declared (or inferred) plain `T` still matches, so you never write `async` or `await` yourself. It has no meaning on the Rust backend.
0 commit comments