Closed Rebal67 closed 1 year ago
Hard to say what this could be without a full trace, can you create a isolated example that reproduces it or does it only happen when the package is imported in your app?
this is happening when we import the package into our app
node_modules/@greymass/eosio/src/serializer/encoder.ts:96:39 - error TS2339: Property 'abiName' does not exist on type 'ABISerializableConstructor | ABITypeDescriptor'.
Property 'abiName' does not exist on type 'ABITypeDescriptor'.
96 } else if (args.type && args.type.abiName !== undefined) {
~~~~~~~
node_modules/@greymass/eosio/src/serializer/encoder.ts:97:9 - error TS2322: Type 'ABISerializableConstructor | ABITypeDescriptor' is not assignable to type 'ABISerializableConstructor'.
Type 'ABITypeDescriptor' is missing the following properties from type 'ABISerializableConstructor': abiName, from
97 type = args.type
~~~~
node_modules/@greymass/eosio/src/serializer/encoder.ts:98:30 - error TS2339: Property 'abiName' does not exist on type 'ABISerializableConstructor | ABITypeDescriptor'.
Property 'abiName' does not exist on type 'ABITypeDescriptor'.
98 typeName = args.type.abiName
What version of TypeScript are you using? This works fine locally for me and in our tests. If you look at the code in encoder.ts you'll see that in the line above there is a isTypeDescriptor
qualifier that should make TS infer the type correctly later on.
steps to reproduce
corepack enable
yarn install
yarn run start
typescript ^4.7.4
this seems to have been solved by changing our typescript config: https://github.com/Tonomy-Foundation/Tonomy-Communication/pull/4/commits/c80e69ed156d7dd5aed45c4c8b7d33610bf69d64#diff-b55cdbef4907b7045f32cc5360d48d262cca5f94062e353089f189f4460039e0R16
we added the following:
"strict": true,
"useUnknownInCatchVariables": false,
Great
node_modules/@greymass/eosio/src/serializer/encoder.ts:97:9 - error TS2322: Type 'ABISerializableConstructor | ABITypeDescriptor' is not assignable to type 'ABISerializableConstructor'. Type 'ABITypeDescriptor' is missing the following properties from type 'ABISerializableConstructor': abiName, from type = args.type
i am getting these errors when importing the package with yarn or using yarn link to link it. then building my app