-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing type definition for https://jslib.k6.io/k6-utils/1.4.0/index.js
import
#118
Comments
This repo doesn't build with tsc directly but with btw, what are you trying to do? You don't need to compile the module it is already available in jslib. |
Thanks @mstoykov for you answer. Our k6 use case import { AWSConfig, SignatureV4 } from "k6-jslib-aws";
import { AWSClient } from "k6-jslib-aws/src/internal/client";
import { HTTPRequest, SignedHTTPRequest } from "k6-jslib-aws/src/internal/http"; With We work around this problem for now with this patch (created with diff --git a/node_modules/k6-jslib-aws/src/internal/secrets-manager.ts b/node_modules/k6-jslib-aws/src/internal/secrets-manager.ts
index cd5967f..dc9148c 100644
--- a/node_modules/k6-jslib-aws/src/internal/secrets-manager.ts
+++ b/node_modules/k6-jslib-aws/src/internal/secrets-manager.ts
@@ -1,5 +1,6 @@
import { JSONArray, JSONObject } from 'k6'
import http, { RefinedResponse, ResponseType } from 'k6/http'
+// @ts-ignore
import { uuidv4 } from 'https://jslib.k6.io/k6-utils/1.4.0/index.js'
import { AWSClient } from './client' |
@oleiade do we want to get this in our code as well? |
Just to confirm my understanding, a fix that would cater to the problem would be to add a |
Yes, adding the Another solution would be, when you can add a type definition file ( declare module 'https://jslib.k6.io/k6-utils/1.4.0/index.js' {
export function uuidv4(): string;
// TODO: Add all functions of utils package (https://grafana.com/docs/k6/latest/javascript-api/jslib/utils/#utils)
} I prefer the second solution to having typed utils functions. |
After upgrading to latest version (0.13.0) to resolve a bug, I got an other problem:
Versions: k6-jslib-aws
v0.13.0
, @types/k60.54.0
Steps to reproduce
The text was updated successfully, but these errors were encountered: