diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache index 4f10c8d1c7d..a8d7af2354c 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache @@ -183,7 +183,7 @@ export function exists(json: any, key: string) { return value !== null && value !== undefined; } -export function querystring(params: HTTPQuery, prefix: string = '') { +export function querystring(params: HTTPQuery, prefix: string = ''): string { return Object.keys(params) .map((key) => { const fullKey = prefix + (prefix.length ? `[${key}]` : key); diff --git a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts index 0ed72ba5352..0afb0ba14c0 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts @@ -194,7 +194,7 @@ export function exists(json: any, key: string) { return value !== null && value !== undefined; } -export function querystring(params: HTTPQuery, prefix: string = '') { +export function querystring(params: HTTPQuery, prefix: string = ''): string { return Object.keys(params) .map((key) => { const fullKey = prefix + (prefix.length ? `[${key}]` : key); diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/runtime.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/runtime.ts index 0ed72ba5352..0afb0ba14c0 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/runtime.ts @@ -194,7 +194,7 @@ export function exists(json: any, key: string) { return value !== null && value !== undefined; } -export function querystring(params: HTTPQuery, prefix: string = '') { +export function querystring(params: HTTPQuery, prefix: string = ''): string { return Object.keys(params) .map((key) => { const fullKey = prefix + (prefix.length ? `[${key}]` : key); diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts index 0ed72ba5352..0afb0ba14c0 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts @@ -194,7 +194,7 @@ export function exists(json: any, key: string) { return value !== null && value !== undefined; } -export function querystring(params: HTTPQuery, prefix: string = '') { +export function querystring(params: HTTPQuery, prefix: string = ''): string { return Object.keys(params) .map((key) => { const fullKey = prefix + (prefix.length ? `[${key}]` : key); diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/runtime.ts index 0ed72ba5352..0afb0ba14c0 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/runtime.ts @@ -194,7 +194,7 @@ export function exists(json: any, key: string) { return value !== null && value !== undefined; } -export function querystring(params: HTTPQuery, prefix: string = '') { +export function querystring(params: HTTPQuery, prefix: string = ''): string { return Object.keys(params) .map((key) => { const fullKey = prefix + (prefix.length ? `[${key}]` : key);