Unverified Commit 2e138532 authored by OJ Kwon's avatar OJ Kwon Committed by GitHub

docs(next-api): trying to document project_update_info_subscribe (#61962)

### What?

Closes PACK-2469

Trying to add some description to the one of the public interface.

---------
Co-authored-by: 's avatarTobias Koppers <tobias.koppers@googlemail.com>
parent ca1b6184
...@@ -737,6 +737,16 @@ impl From<UpdateInfo> for NapiUpdateInfo { ...@@ -737,6 +737,16 @@ impl From<UpdateInfo> for NapiUpdateInfo {
} }
} }
/// Subscribes to lifecycle events of the compilation.
/// Emits an [UpdateMessage::Start] event when any computation starts.
/// Emits an [UpdateMessage::End] event when there was no computation for the
/// specified time (`aggregation_ms`). The [UpdateMessage::End] event contains
/// information about the computations that happened since the
/// [UpdateMessage::Start] event. It contains the duration of the computation
/// (excluding the idle time that was spend waiting for `aggregation_ms`), and
/// the number of tasks that were executed.
///
/// The signature of the `func` is `(update_message: UpdateMessage) => void`.
#[napi] #[napi]
pub fn project_update_info_subscribe( pub fn project_update_info_subscribe(
#[napi(ts_arg_type = "{ __napiType: \"Project\" }")] project: External<ProjectInstance>, #[napi(ts_arg_type = "{ __napiType: \"Project\" }")] project: External<ProjectInstance>,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment