diff --git a/src/api/tojs.ts b/src/api/tojs.ts index 67a3e19b3..886187c77 100644 --- a/src/api/tojs.ts +++ b/src/api/tojs.ts @@ -8,6 +8,9 @@ import {deprecated, isArrayLike} from "../utils/utils"; /** * Basically, a deep clone, so that no reactive property will exist anymore. */ +export function toJS(source: T, detectCycles?: boolean): T; +export function toJS(source: any, detectCycles?: boolean): any; +export function toJS(source, detectCycles: boolean, __alreadySeen: [any, any][]); // internal overload export function toJS(source, detectCycles: boolean = true, __alreadySeen: [any, any][] = null) { // optimization: using ES6 map would be more efficient! // optimization: lift this function outside toJS, this makes recursion expensive