contentful-sdk-core
Version:
Core modules for the Contentful JS SDKs
13 lines (12 loc) • 395 B
TypeScript
/**
* Mixes in a method to return just a plain object with no additional methods
* @private
* @param data - Any plain JSON response returned from the API
* @return Enhanced object with toPlainObject method
*/
export default function toPlainObject<T = Record<string, unknown>, R = T>(data: T): T & {
/**
* Returns this entity as a plain JS object
*/
toPlainObject(): R;
};