Skip to content

Commit

Permalink
fix: replace extending null
Browse files Browse the repository at this point in the history
  • Loading branch information
lgandecki committed Sep 23, 2020
1 parent 789110f commit 937d8ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/chimp-datasources-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions lib/typescript-fetch/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Configuration } from "./configuration";
import { RESTDataSource } from "apollo-datasource-rest";
// {$CustomDataSourcePlaceholder}

type GenericObject<key, type> = {}

const BASE_PATH = "{{{basePath}}}".replace(/\/+$/, "");

Expand Down

0 comments on commit 937d8ae

Please # to comment.