TypeScript API / laikacms/json-api / fromJsonApiNoId
Function: fromJsonApiNoId()
ts
function fromJsonApiNoId<T, O>(data): O;Transforms a JSON:API resource to domain object format (without id)
Type Parameters
| Type Parameter |
|---|
T extends string |
O extends Record<string, unknown> |
Parameters
| Parameter | Type | Description |
|---|---|---|
data | { attributes: O; type: T; } | The JSON:API resource |
data.attributes | O | - |
data.type | T | - |
Returns
O