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

TS error when using r with Uint8Array #10

Open
neezer opened this issue Nov 19, 2022 · 3 comments
Open

TS error when using r with Uint8Array #10

neezer opened this issue Nov 19, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@neezer
Copy link

neezer commented Nov 19, 2022

Perhaps there is an incomplete definition on ReactiveProxy... ?

import { r } from "@arrow-js/core";

type Data = {
	payload: Uint8Array;
};

const data = r<Data>({
	payload: new Uint8Array(),
});

data.payload = new Uint8Array();
// ^^^^^^^^^ Type 'Uint8Array' is not assignable to type 'ReactiveProxy<Uint8Array>'.
@RafalKornel
Copy link
Contributor

Can this issue be related?

@neezer
Copy link
Author

neezer commented Nov 19, 2022

@RafalKornel Yeah, possibly.

Considering that issue says the code works, I'm guessing the type definition for ReactiveProxy is incomplete, but I haven't looked at the source yet.

@justin-schroeder
Copy link
Owner

Yes — the typing on r needs more work. I actually think r would be on the short list for a rewrite.

@justin-schroeder justin-schroeder added the bug Something isn't working label Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants