Skip to content

change buffer type to string in File interface - #115

Open
JunNishimura wants to merge 5 commits into
grafana:v1.7.xfrom
JunNishimura:fix/change_buffer_type_in_file
Open

change buffer type to string in File interface#115
JunNishimura wants to merge 5 commits into
grafana:v1.7.xfrom
JunNishimura:fix/change_buffer_type_in_file

Conversation

@JunNishimura

@JunNishimura JunNishimura commented Mar 20, 2026

Copy link
Copy Markdown

What I did

This fixes grafana/k6#4655

Regarding the above issue, I took the approach of changing the type of the buffer property of the File interface to string.

I thought that aligning the type to Base64-encoded strings would have the smallest impact because the existing implementation expects Base64-encoded strings.

The description regarding mimeType mentioned in the issue has already been resolved, so I didn't do anything about the mimeType property.

The issue where the type of the buffer property is listed as ArrayBuffer in the documentation has been fixed in the following pull request. I plan to merge the PR below after merging this PR, or at the same time.

grafana/k6-docs#2205


Since no tests were implemented from the start, the tests are not being run and added.

Please fill in this template.

Select one of these and delete the others:

If adding a new definition:

  • The package does not already provide its own types, or cannot have its .d.ts files generated via --declaration
  • If this is for an npm package, match the name. If not, do not conflict with the name of an npm package.
  • Create it with dts-gen --dt, not by basing it on an existing project.
  • Represents shape of module/library correctly
  • tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: I wrote descriptions above
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the package.json.

If removing a declaration:

  • If a package was never on Definitely Typed, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.)
  • Delete the package's directory.
  • Add it to notNeededPackages.json.

@joanlopez

Copy link
Copy Markdown

Can you please review the conflicts @JunNishimura? Thanks!

@JunNishimura

Copy link
Copy Markdown
Author

@joanlopez

Hi, I resolved the conflicts. I would appreciate it if you check again. Thanks!

@joanlopez
joanlopez changed the base branch from master to v1.7.x April 8, 2026 09:21
@inancgumus
inancgumus removed their request for review June 17, 2026 23:08
@szkiba
szkiba removed their request for review July 7, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

browser: setInputFiles documentation and behavior mismatch

5 participants