Correct heic-convert types#75074
Conversation
|
@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 ReviewsBecause 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
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"
} |
|
🔔 @treemmett — please review this PR in the next few days. Be sure to explicitly select |
|
Ready to merge |
|
Ready to merge |
|
🛂 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! |
|
@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:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@treemmett: you can do this too.) |
Documentation mentioning
Uint8Arrayand NodeJSBuffer: https://github.com/catdad-experiments/heic-convert#readmeThose are not the same as
ArrayBuffer. Thus the need for a correction (right now inputing anArrayBuffervariable triggers a bug and the workaround is to use aUint8Arrayvariable - the correct typeand douInt8ArrayVar as unknown as ArrayBuffer` to trick Typescript typing).NodeJS
Bufferis a subclass ofUint8ArraysoUint8Arrayis enough.Due to Typescript 5.6 and others, had to change the tests to be
Promise<Uint8Array> || Promise<Uint8Array<ArrayBuffer>>wherePromise<Uint8Array>is for 5.6 andPromise<Uint8Array<ArrayBuffer>>is for 5.7+Once Typescript 5.6 will be deprecated, all types can be changed to Uint8Array.