LendAndRegret/node_modules/es-toolkit/dist/compat/util/toPlainObject.d.mts
2026-05-02 17:27:43 +08:00

17 lines
454 B
TypeScript

/**
* Converts value to a plain object flattening inherited enumerable string keyed properties of value to own properties of the plain object.
*
* @param {any} value The value to convert.
* @returns {any} Returns the converted plain object.
*
* @example
* function Foo() {
* this.b = 2;
* }
* Foo.prototype.c = 3;
* toPlainObject(new Foo()); // { b: 2, c: 3 }
*/
declare function toPlainObject(value?: any): any;
export { toPlainObject };