diff --git a/lib/chimp-datasources-generator.js b/lib/chimp-datasources-generator.js index 1985357..0fa8095 100755 --- a/lib/chimp-datasources-generator.js +++ b/lib/chimp-datasources-generator.js @@ -45,6 +45,13 @@ program shelljs.sed("-i", /this.UPDATE/, "this.update", `${resolvedPath}/api.ts`); shelljs.sed("-i", /this.PUT/, "this.put", `${resolvedPath}/api.ts`); + shelljs.sed( + "-i", + /extends null/, + "extends GenericObject", + `${resolvedPath}/api.ts` + ); + if (dataSourceImport) { const { dataSourceName, importString } = extractor(dataSourceImport); diff --git a/lib/typescript-fetch/api.mustache b/lib/typescript-fetch/api.mustache index 044b90a..14758af 100644 --- a/lib/typescript-fetch/api.mustache +++ b/lib/typescript-fetch/api.mustache @@ -8,6 +8,7 @@ import { Configuration } from "./configuration"; import { RESTDataSource } from "apollo-datasource-rest"; // {$CustomDataSourcePlaceholder} +type GenericObject = {} const BASE_PATH = "{{{basePath}}}".replace(/\/+$/, "");