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

idl.d.ts specifies the wrong type for IDL.encode #2061

Open
bdemann opened this issue Sep 4, 2024 · 0 comments
Open

idl.d.ts specifies the wrong type for IDL.encode #2061

bdemann opened this issue Sep 4, 2024 · 0 comments
Milestone

Comments

@bdemann
Copy link
Member

bdemann commented Sep 4, 2024

It specifies that the return type is an ArrayBuffer but it is actually a Uint8Array. Until such a time as @dfinity/candid is updated to reflect the correct types any time that we want to get an ArrayBuffer from IDL.encode we have to get the buffer property from the result. This causes out typechecking to break since ArrayBuffer doesn't have a buffer property. As a result in all the places where this happens (Though I can only think of one in the reply API) we need to ignore the error

dfinity/agent-js#950

@lastmjs lastmjs added this to the 1.0 milestone Jan 8, 2025
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

No branches or pull requests

2 participants