core.readablepromise.read
Home > @medplum/core > ReadablePromise > read
ReadablePromise.read() method
Attempts to read the value of the promise. If the promise is pending, this method will throw a promise. If the promise rejected, this method will throw the rejection reason. If the promise resolved, this method will return the resolved value.
Signature:
read(): T;
Returns:
T
The resolved value of the Promise.