Skip to content

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 ​

ParameterTypeDescription
data{ attributes: O; type: T; }The JSON:API resource
data.attributesO-
data.typeT-

Returns ​

O

Released under the MIT License.