parseRequestResultForType<T> function
If you searched or requested only a specific type of result, this will perform similarly to above, but will return ONLY that type of resource in the resources field, others will be included in the otherResources as well as in an OperationOutcome as a contained resource
Implementation
ReturnResults<T> parseRequestResultForType<T>(Resource result) => result
is OperationOutcome
? isInformational(result)
? ReturnResults<T>(
informationOperationOutcomes: <OperationOutcome>[result])
: ReturnResults<T>(errorOperationOutcomes: <OperationOutcome>[result])
: result is T
? ReturnResults<T>(resources: <T>[result as T])
: result is Bundle
? parseBundleForType<T>(result)
: ReturnResults<T>(errorOperationOutcomes: <OperationOutcome>[
incorrectResultType<T>(result)
]);