From db1b63780d57ffb5dd9a6d76123400c4e0788a52 Mon Sep 17 00:00:00 2001 From: Jan Buchar Date: Fri, 22 Mar 2019 07:42:31 +0100 Subject: [PATCH] Add return type declaration to typescript-fetch runtime (#2466) * Add return type declaration to typescript-fetch runtime closes #2461 * Regenerate samples --- .../src/main/resources/typescript-fetch/runtime.mustache | 2 +- .../client/petstore/typescript-fetch/builds/default/runtime.ts | 2 +- .../petstore/typescript-fetch/builds/es6-target/runtime.ts | 2 +- .../petstore/typescript-fetch/builds/with-interfaces/runtime.ts | 2 +- .../typescript-fetch/builds/with-npm-version/runtime.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) 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);