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

buffer-layout typescript issue #11

Open
etodanik opened this issue Sep 28, 2021 · 8 comments
Open

buffer-layout typescript issue #11

etodanik opened this issue Sep 28, 2021 · 8 comments
Assignees

Comments

@etodanik
Copy link
Collaborator

We have an issue with one of our upstream dependencies:

node_modules/@solana/spl-token/lib/index.d.ts(3,24): error TS7016: Could not find a declaration file for module 'buffer-layout'. '/Users/danny/src/metaplexql/node_modules/buffer-layout/lib/Layout.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/buffer-layout` if it exists or add a new declaration (.d.ts) file containing `declare module 'buffer-layout';

It appears that @solana/spl-token depends on this package, and it currently has no TypeScript support:
pabigot/buffer-layout#30

@jstarry
Copy link

jstarry commented Oct 19, 2021

@israelidanny can you open an issue on the SPL repo to migrate from buffer-layout to @solana/buffer-layout which has type definitions? That should resolve this issue once fixed.

@etodanik
Copy link
Collaborator Author

Done @jstarry
solana-labs/solana-program-library#2534

If they take too long I'll submit a PR too

@aheckmann aheckmann moved this to Triage in Metaplex Dec 9, 2021
@aheckmann
Copy link
Contributor

aheckmann commented Dec 11, 2021

looks like a partial fix landed upstream solana-labs/solana-program-library#2629. Please confirm @israelidanny if we are good to go now or not.

@aheckmann aheckmann moved this from Triage to Hacking in Metaplex Dec 11, 2021
@etodanik
Copy link
Collaborator Author

I added a more complete fix but it has a couple of caveats (and a pull request in @solana/buffer-layout that needs merging)
solana-labs/solana-program-library#2634

@jordaaash
Copy link

The relevant PR in @solana/buffer-layout has been merged and the package released. No rush from my end, just letting you know!

@etodanik
Copy link
Collaborator Author

@jordansexton I updated my branch to include the new @solana/buffer-layout and removed code made redundant by the new utils package!

@aheckmann
Copy link
Contributor

Update: the upstream changes are still in progress in solana-labs/solana-program-library#2634

@jordaaash
Copy link

solana-labs/solana-program-library#2634 has been merged. Thank you for your patience! Which NPM packages are you blocked on here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Hacking
Development

No branches or pull requests

4 participants