js-deprecated
js-deprecated copied to clipboard
buffer-layout typescript issue
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:
https://github.com/pabigot/buffer-layout/issues/30
@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.
Done @jstarry https://github.com/solana-labs/solana-program-library/issues/2534
If they take too long I'll submit a PR too
looks like a partial fix landed upstream https://github.com/solana-labs/solana-program-library/pull/2629. Please confirm @israelidanny if we are good to go now or not.
I added a more complete fix but it has a couple of caveats (and a pull request in @solana/buffer-layout that needs merging) https://github.com/solana-labs/solana-program-library/pull/2634
The relevant PR in @solana/buffer-layout has been merged and the package released. No rush from my end, just letting you know!
@jordansexton I updated my branch to include the new @solana/buffer-layout and removed code made redundant by the new utils package!
Update: the upstream changes are still in progress in https://github.com/solana-labs/solana-program-library/pull/2634
https://github.com/solana-labs/solana-program-library/pull/2634 has been merged. Thank you for your patience! Which NPM packages are you blocked on here?