Skip to content

Correct heic-convert types#75074

Open
qchappat wants to merge 17 commits into
DefinitelyTyped:masterfrom
qchappat:qchappat/correct-heic-convert-types
Open

Correct heic-convert types#75074
qchappat wants to merge 17 commits into
DefinitelyTyped:masterfrom
qchappat:qchappat/correct-heic-convert-types

Conversation

@qchappat
Copy link
Copy Markdown

@qchappat qchappat commented Jun 2, 2026

Documentation mentioning Uint8Array and NodeJS Buffer: https://github.com/catdad-experiments/heic-convert#readme

Those are not the same as ArrayBuffer. Thus the need for a correction (right now inputing an ArrayBuffer variable triggers a bug and the workaround is to use a Uint8Array variable - the correct typeand douInt8ArrayVar as unknown as ArrayBuffer` to trick Typescript typing).

NodeJS Buffer is a subclass of Uint8Array so Uint8Array is enough.

Due to Typescript 5.6 and others, had to change the tests to be Promise<Uint8Array> || Promise<Uint8Array<ArrayBuffer>> where Promise<Uint8Array> is for 5.6 and Promise<Uint8Array<ArrayBuffer>> is for 5.7+

Once Typescript 5.6 will be deprecated, all types can be changed to Uint8Array.

@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Jun 2, 2026

@qchappat Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.

This is a live comment that I will keep updated.

1 package in this PR

Code Reviews

Because you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Most recent commit is approved by type definition owners or DT maintainers

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 75074,
  "author": "qchappat",
  "headCommitOid": "a8e6fde04f47b534be756432cde474843b52c78e",
  "mergeBaseOid": "8666c48fb138e2142a9819ebfd87c511d6e678a8",
  "lastPushDate": "2026-06-02T17:06:31.000Z",
  "lastActivityDate": "2026-06-03T12:16:41.000Z",
  "mergeRequestDate": "2026-06-03T12:16:41.000Z",
  "mergeRequestUser": "qchappat",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "hugeChange": false,
  "tooManyCommits": false,
  "tooManyReviews": false,
  "popularityLevel": "Popular",
  "pkgInfo": [
    {
      "name": "heic-convert",
      "kind": "edit",
      "files": [
        {
          "path": "types/heic-convert/browser.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/heic-convert/heic-convert-tests.mts",
          "kind": "test"
        },
        {
          "path": "types/heic-convert/heic-convert-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/heic-convert/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "treemmett"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Popular"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "treemmett",
      "date": "2026-06-03T05:29:18.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 4604897459,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added the Popular package This PR affects a popular package (as counted by NPM download counts). label Jun 2, 2026
@typescript-bot typescript-bot moved this to Waiting for Code Reviews in Pull Request Status Board Jun 2, 2026
@typescript-bot
Copy link
Copy Markdown
Contributor

🔔 @treemmett — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner labels Jun 3, 2026
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Waiting for Author to Merge in Pull Request Status Board Jun 3, 2026
@qchappat
Copy link
Copy Markdown
Author

qchappat commented Jun 3, 2026

Ready to merge

@qchappat
Copy link
Copy Markdown
Author

qchappat commented Jun 3, 2026

Ready to merge

@typescript-bot typescript-bot removed the Self Merge This PR can now be self-merged by the PR author or an owner label Jun 3, 2026
@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Waiting for Code Reviews in Pull Request Status Board Jun 3, 2026
@typescript-bot
Copy link
Copy Markdown
Contributor

🛂 Hi @qchappat,

I can't accept a pull request until all of the checks in the "Status" section of this comment are green. I will let you know once that happens.

Thanks, and happy typing!

@typescript-bot typescript-bot added the Self Merge This PR can now be self-merged by the PR author or an owner label Jun 3, 2026
@typescript-bot
Copy link
Copy Markdown
Contributor

@qchappat: Everything looks good here. I am ready to merge this PR (at a8e6fde) on your behalf whenever you think it's ready.

If you'd like that to happen, please post a comment saying:

Ready to merge

and I'll merge this PR almost instantly. Thanks for helping out! ❤️

(@treemmett: you can do this too.)

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Waiting for Author to Merge in Pull Request Status Board Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Owner Approved A listed owner of this package signed off on the pull request. Popular package This PR affects a popular package (as counted by NPM download counts). Self Merge This PR can now be self-merged by the PR author or an owner

Projects

Status: Waiting for Author to Merge

Development

Successfully merging this pull request may close these issues.

3 participants