core.assertok
Home > @medplum/core > assertOk
assertOk() function
Asserts that the operation completed successfully and that the resource is defined.
Signature:
export declare function assertOk<T>(outcome: OperationOutcome, resource: T | undefined): asserts resource is T;
Parameters
Parameter | Type | Description |
---|---|---|
outcome | OperationOutcome | The operation outcome. |
resource | T | undefined | The resource that may or may not have been returned. |
Returns:
asserts resource is T