Skip to content

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
Clone this wiki locally