-
Notifications
You must be signed in to change notification settings - Fork 2
Resolving
Dillon Redding edited this page Dec 31, 2023
·
3 revisions
When working with sub-entities, we often need a way to ensure we're dealing with an embedded entity and not an embedded link. The resolve
function does just this.
import { resolve } from '@siren-js/client';
const orderedItemsEntity = await resolve(embeddedOrderedItemsLink);
await resolve<EmeddedCustomerProperties>(embeddedCustomerEntity);
//=> returns embeddedCustomerEntity as is