UNPKG

395 BTypeScriptView Raw
1/**
2 * Mixes in a method to return just a plain object with no additional methods
3 * @private
4 * @param data - Any plain JSON response returned from the API
5 * @return Enhanced object with toPlainObject method
6 */
7export default function toPlainObject<T = Record<string, unknown>, R = T>(data: T): T & {
8 /**
9 * Returns this entity as a plain JS object
10 */
11 toPlainObject(): R;
12};