From 0ca421239624fda55465f74022cc7d819d1e38cc Mon Sep 17 00:00:00 2001 From: David Clark Date: Fri, 14 Apr 2023 20:06:49 +1000 Subject: [PATCH] adds function overload to NDFrame toCSV and toJSON so danfojs-base and danfojs-node DataFrame types match --- src/danfojs-base/core/generic.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/danfojs-base/core/generic.ts b/src/danfojs-base/core/generic.ts index f4f68cae..d374aecf 100644 --- a/src/danfojs-base/core/generic.ts +++ b/src/danfojs-base/core/generic.ts @@ -445,6 +445,7 @@ export default class NDframe implements NDframeInterface { * sep: "+" * }) */ + toCSV(options?: any): string toCSV(options?: any): string | void { throw new Error("`toCSV` function is deprecated. Use `toCSV` function directly instead. e.g. `dfd.toCSV(df)`") } @@ -468,6 +469,7 @@ export default class NDframe implements NDframeInterface { * }) * ``` */ + toJSON(options?: any): object toJSON(options?: any): object | void { throw new Error("`toJSON` function is deprecated. Use `toJSON` function directly instead. e.g. `dfd.toJSON(df, { format: 'row' })`") }