@goast/typescript 0.5.1-k6.1 → 0.5.1-k6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  // @deno-types="npm:@types/k6/http"
2
- import http from 'k6/http';
2
+ import http, { Params, Response } from 'k6/http';
3
3
 
4
4
  /**
5
5
  * Defines the options for appending a parameter
@@ -11,7 +11,7 @@ type ParameterOptions = {
11
11
 
12
12
  type BuildOptions = {
13
13
  accept?: string;
14
- params?: http.Params;
14
+ params?: Params;
15
15
  };
16
16
 
17
17
  /**
@@ -160,7 +160,7 @@ class QueryParameter extends Parameter {
160
160
  }
161
161
  } else {
162
162
  // Append a single parameter whose values are a comma-separated list of key,value,key,value...
163
- const array = [];
163
+ const array: unknown[] = [];
164
164
  for (const key of Object.keys(this.value)) {
165
165
  const propVal = this.value[key];
166
166
  if (propVal !== null && propVal !== undefined) {
@@ -286,7 +286,7 @@ export class RequestBuilder {
286
286
  /**
287
287
  * Builds the request with the current set parameters
288
288
  */
289
- public build(options?: BuildOptions): http.Response {
289
+ public build(options?: BuildOptions): Response {
290
290
  // Perform the request
291
291
  return http.request(...this.buildRequestParams(options));
292
292
  }
@@ -294,7 +294,7 @@ export class RequestBuilder {
294
294
  /**
295
295
  * Builds the request with the current set parameters
296
296
  */
297
- public buildAsync(options?: BuildOptions): Promise<http.Response> {
297
+ public buildAsync(options?: BuildOptions): Promise<Response> {
298
298
  // Perform the request
299
299
  return http.asyncRequest(...this.buildRequestParams(options));
300
300
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goast/typescript",
3
- "version": "0.5.1-k6.1",
3
+ "version": "0.5.1-k6.2",
4
4
  "description": "Provides gOAst generators for generating TypeScript code from OpenAPI specifications.",
5
5
  "author": {
6
6
  "name": "Marc Schmidt (MaSch0212)",