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

Typescript issue with buffer-layout #249

Open
frolovdev opened this issue Dec 6, 2022 · 1 comment
Open

Typescript issue with buffer-layout #249

frolovdev opened this issue Dec 6, 2022 · 1 comment

Comments

@frolovdev
Copy link

Hi there, thanks for the awesome library

The problem

version: 0.2.5

import * as borsh from "@project-serum/borsh";

borsh.struct([
    borsh.u8("variant"),
    borsh.str("title"),
    borsh.u8("rating"),
    borsh.str("description"),
  ]);

In such an example .struct and all other methods related to buffer-layout package literally treated as any

If we dive into the resulting package, we will see the next picture.

image

Proposed solution

Maybe it's a good idea to rely on an official fork of solana buffer-layout

https://github.com/solana-labs/buffer-layout

P.S.

I can help with pr for sure, but want to discuss it first

@frolovdev frolovdev changed the title Typescript issue Typescript issue with buffer-layout Dec 6, 2022
@frolovdev
Copy link
Author

Made small research, the main problem with migrating to their solution is

solana-labs/buffer-layout#4

Trying to force the merge by myself right now

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

1 participant