Skip to content
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

Type error with latest @types/k6 version #115

Closed
fullheart opened this issue Aug 7, 2024 · 4 comments
Closed

Type error with latest @types/k6 version #115

fullheart opened this issue Aug 7, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@fullheart
Copy link

fullheart commented Aug 7, 2024

Problem: The TS file src/internal/s3.ts has a type error with the latest @types/k6 package.

Version

  • k6-jslib-aws v0.12.3
  • @types/k6 ~0.52.0

Error message:

src/internal/s3.ts:200:13 - error TS2345: Argument of type 'string | ArrayBuffer' is not assignable to parameter of type 'string | bytes'.
  Type 'ArrayBuffer' is not assignable to type 'string | bytes'.
    Type 'ArrayBuffer' is missing the following properties from type 'number[]': length, pop, push, concat, and 28 more.

200             res.body
                ~~~~~~~~


Found 1 error in src/internal/s3.ts:200

How to reproduce?

git clone [email protected]:grafana/k6-jslib-aws.git
cd k6-jslib-aws/
git checkout v0.12.3
npm install --save-dev @types/k6 # Install latest `@types/k6` package
npx tsc -t es5 src/internal/s3.ts # See error output above
@mstoykov
Copy link
Contributor

mstoykov commented Aug 7, 2024

This has been fixed in the current master in b312325

cc @oleiade are we going to be releasing a version soon?

@mstoykov mstoykov removed the triage label Aug 7, 2024
@mstoykov mstoykov assigned oleiade and unassigned mstoykov Oct 3, 2024
@oleiade
Copy link
Member

oleiade commented Oct 7, 2024

I'll be making a release as soon as possible indeed 🙇🏻

@oleiade oleiade added the bug Something isn't working label Oct 7, 2024
@oleiade
Copy link
Member

oleiade commented Oct 9, 2024

jslib-aws v0.13.0 is out. @fullheart would you mind trying again and let us know if it addressed your issue 👍🏻

Without a sign back from you I'll close this issue in a week 🙇🏻

@fullheart
Copy link
Author

@oleiade Great, thanks. I tested version 0.13.0. The type error is fixed. I am closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants