From 937d8ae344328f1e591ce2ff6cdd435ab53acbda Mon Sep 17 00:00:00 2001 From: lgandecki Date: Wed, 23 Sep 2020 11:25:10 +0200 Subject: [PATCH] fix: replace extending null --- lib/chimp-datasources-generator.js | 7 +++++++ lib/typescript-fetch/api.mustache | 1 + 2 files changed, 8 insertions(+) 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(/\/+$/, "");