Skip to content

Commit 70941d6

Browse files
authored
fix typescript-fetch typos
It looks like there's a couple typos that cause compilation to fail. I implemented the first two changes suggested in swagger-api#11870 as that is what allowed me to build in typescript 4.9.5.
1 parent e611a06 commit 70941d6

File tree

1 file changed

+2
-2
lines changed
  • modules/swagger-codegen/src/main/resources/typescript-fetch

1 file changed

+2
-2
lines changed

modules/swagger-codegen/src/main/resources/typescript-fetch/api.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export interface FetchArgs {
4444
* @class BaseAPI
4545
*/
4646
export class BaseAPI {
47-
protected configuration: Configuration;
47+
protected configuration?: Configuration;
4848
4949
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected fetch: FetchAPI = portableFetch) {
5050
if (configuration) {
@@ -61,7 +61,7 @@ export class BaseAPI {
6161
* @extends {Error}
6262
*/
6363
export class RequiredError extends Error {
64-
name: "RequiredError"
64+
name = "RequiredError"
6565
constructor(public field: string, msg?: string) {
6666
super(msg);
6767
}

0 commit comments

Comments
 (0)