-
Notifications
You must be signed in to change notification settings - Fork 15
Error Generating type definitions - for ESNext / ES2024 . SharedArrayBuffer vs ArrayBuffer incompatibility - uniffi-bindgen-react-native: 0.28.3-2 #225
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
Comments
As a temporary fix - changing the {
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2022"],
"module": "ES2022",
...
}
} |
Possible Debugging Some starting pointers to the debugging of the underlying issue: As per this link - https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-7.html#support-for---target-es2024-and---lib-es2024 ( "Support for --target es2024 and --lib es2024" ) "Note that as part of the changes to SharedArrayBuffer and ArrayBuffer, the two now diverge a bit. To bridge the gap and preserve the underlying buffer type, all TypedArrays (like Uint8Array and others) .... " I am not sure of the changes but I believe that could be a starting point to investigate the differences between ES2024 and ES2022 and why this bindgen fails for ES2024. |
I'm not sure if it's related but we discussed some issues around updating to TS 5.7.2 in #168. TS doesn't seem to use semantic versioning and |
As described earlier , the error is specific to two things
Both the conditions apply for the error to appear. |
I'm sorry, I may be misunderstanding but you said |
I'm hitting this as well with Typescript 5.7.3. My workaround was changing some instances of ArrayBuffer to ArrayBufferLike in |
It seems less to do with the typescript version .
But more to do with the ESNext / ES2024 - target / lib etc.
Don't have much bandwidth - but can be easily reproducible with ESNext /
ES2024 (specifically) for target/lib . FYI.
…On Sat, Mar 8, 2025 at 12:50 AM Johannes Marbach ***@***.***> wrote:
I'm sorry, I may be misunderstanding but you said ^5.7.2 which allows
anything up to but not including 6.0.0. I just wanted to double check
what your resolved TS version is.
—
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAJMNQN44EOA2DZI5JOA3D2THWPRAVCNFSM6AAAAABYEABOPSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMBXGIZDSMRWGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
[image: Johennes]*Johennes* left a comment
(jhugman/uniffi-bindgen-react-native#225)
<#225 (comment)>
I'm sorry, I may be misunderstanding but you said ^5.7.2 which allows
anything up to but not including 6.0.0. I just wanted to double check
what your resolved TS version is.
—
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAJMNQN44EOA2DZI5JOA3D2THWPRAVCNFSM6AAAAABYEABOPSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMBXGIZDSMRWGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Uh oh!
There was an error while loading. Please reload this page.
Environment
Package.json :
Issue
There is an error when generating typescript definitions when using this bindgen
Specifically this error appears for ESNext ( or - rather implied to be ES2024 as of reporting this issue ).
yarn prepare
fails at the step -Generating type definitions with tsc
.The text was updated successfully, but these errors were encountered: