Skip to main content

core.readablepromise.finally

Home > @medplum/core > ReadablePromise > finally

ReadablePromise.finally() method

Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

Signature:

finally(onfinally?: (() => void) | undefined | null): Promise<T>;

Parameters

Parameter

Type

Description

onfinally

(() => void) | undefined | null

(Optional) The callback to execute when the Promise is settled (fulfilled or rejected).

Returns:

Promise<T>

A Promise for the completion of the callback.