ERROR in /app/node_modules/dragonbones-runtime/DragonBones/src/dragonBones/parser/BinaryDataParser.ts
[tsl] ERROR in /app/node_modules/dragonbones-runtime/DragonBones/src/dragonBones/parser/BinaryDataParser.ts(384,13)
TS2322: Type 'Int16Array' is not assignable to type 'Uint16Array'.
Types of property '[Symbol.toStringTag]' are incompatible.
Type '"Int16Array"' is not assignable to type '"Uint16Array"'.
ERROR in /app/node_modules/dragonbones-runtime/DragonBones/src/dragonBones/parser/ObjectDataParser.ts
[tsl] ERROR in /app/node_modules/dragonbones-runtime/DragonBones/src/dragonBones/parser/ObjectDataParser.ts(2290,13)
TS2322: Type 'Int16Array' is not assignable to type 'Uint16Array'.
When checking the source code, I can see:
public colorArray: Uint16Array;
The unsigned type seems fine for a color representation, but later in the code, it is trying to assign a signed integer to this color attribute.
This PR fixes these errors by using unsigned integers when working with colors.
Note: A quick hack was to change colorArray to a signed type, this only diff is clearing errors, but not sure if it is a good solution.
I got a type error from Typescript:
When checking the source code, I can see:
The unsigned type seems fine for a color representation, but later in the code, it is trying to assign a signed integer to this color attribute.
This PR fixes these errors by using unsigned integers when working with colors.
Note: A quick hack was to change
colorArray
to a signed type, this only diff is clearing errors, but not sure if it is a good solution.