sol-wallet-adapter icon indicating copy to clipboard operation
sol-wallet-adapter copied to clipboard

Cannot import correctly under TypeScript Node 16 module resolution

Open Jack-Works opened this issue 2 years ago • 0 comments

Under TypeScript Node 16 module resolution (has type: module in the package.json and moduleResolution: Node16 in tsconfig.json), this package cannot be imported correctly.

image

import Wallet from '@project-serum/sol-wallet-adapter'
new Wallet()
// type error!
new Wallet.default(provider, 'network')
// runtime error!

Jack-Works avatar Nov 05 '22 03:11 Jack-Works