waitUntil

abstract fun waitUntil(thenable: PromiseLike<WorkspaceEdit>)(source)

Allows to pause the event loop and to apply workspace edit. Edits of subsequent calls to this function will be applied in order. The edits will be ignored if concurrent modifications of the notebook document happened.

Note: This function can only be called during event dispatch and not in an asynchronous manner:

workspace.onWillSaveNotebookDocument(event => {
// async, will *throw* an error
setTimeout(() => event.waitUntil(promise));

// sync, OK
event.waitUntil(promise);
})

Parameters

thenable

A thenable that resolves to workspace edit.

Online Documentation


abstract fun waitUntil(thenable: PromiseLike<JsAny?>)(source)

Allows to pause the event loop until the provided thenable resolved.

Note: This function can only be called during event dispatch.

Parameters

thenable

A thenable that delays saving.

Online Documentation