waitUntil

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

Allows to pause the event and to apply a workspace edit.

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

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

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

Parameters

thenable

A thenable that delays saving.

Online Documentation


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

Allows to pause the event until the provided thenable resolves.

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

Parameters

thenable

A thenable that delays saving.

Online Documentation