Closed tinyhill666 closed 3 years ago
You'll need to specify an encoder and decoder if the version of Angular you're using doesn't define them by default.
// initialize the link
const link = new AnchorLink({
textDecoder: new TextDecoder(),
textEncoder: new TextEncoder(),
transport
})
If those are undefined in the version of JS/TS you're using, you may need a polyfill.
https://github.com/anonyco/FastestSmallestTextEncoderDecoder
Closing as this relates to version 2.0 and no further details where given.
ERROR in node_modules/anchor-link/lib/link-options.d.ts(37,19): error TS2304: Cannot find name 'TextEncoder'. node_modules/anchor-link/lib/link-options.d.ts(41,19): error TS2304: Cannot find name 'TextDecoder'. node_modules/anchor-link/lib/link-session.d.ts(85,21): error TS1039: Initializers are not allowed in ambient contexts. node_modules/anchor-link/lib/link-session.d.ts(88,5): error TS2424: Class 'LinkSession' defines instance member function 'serialize', but extended class 'LinkChannelSession' defines it as instance member property. node_modules/anchor-link/lib/link-session.d.ts(121,21): error TS1039: Initializers are not allowed in ambient contexts. node_modules/anchor-link/lib/link-session.d.ts(127,5): error TS2424: Class 'LinkSession' defines instance member function 'serialize', but extended class 'LinkFallbackSession' defines it as instance member property. node_modules/eosio-signing-request/lib/signing-request.d.ts(242,73): error TS2304: Cannot find name 'TextEncoder'. node_modules/eosio-signing-request/lib/signing-request.d.ts(242,99): error TS2304: Cannot find name 'TextDecoder'.