```ts src/ts/documents/K4Item.ts:314:7 - error TS2415: Class 'K4Item<T>' incorrectly extends base cl

src/ts/documents/K4Item.ts:314:7 - error TS2415: Class 'K4Item<T>' incorrectly extends base class 'Item'.
Types of property 'system' are incompatible.
Type 'System<T>' is not assignable to type 'AnyObject'.
Type 'InterfaceToObject<Advantage> | InterfaceToObject<Disadvantage> | InterfaceToObject<Move> | ... 4 more ... | Any' is not assignable to type 'AnyObject'.
Type 'Advantage' is not assignable to type 'AnyObject'.
Index signature for type 'string' is missing in type 'Advantage'
src/ts/documents/K4Item.ts:314:7 - error TS2415: Class 'K4Item<T>' incorrectly extends base class 'Item'.
Types of property 'system' are incompatible.
Type 'System<T>' is not assignable to type 'AnyObject'.
Type 'InterfaceToObject<Advantage> | InterfaceToObject<Disadvantage> | InterfaceToObject<Move> | ... 4 more ... | Any' is not assignable to type 'AnyObject'.
Type 'Advantage' is not assignable to type 'AnyObject'.
Index signature for type 'string' is missing in type 'Advantage'
11 Replies
LukeAbby
LukeAbbyOP•5mo ago
I can't believe it...
Eunomiac
Eunomiac•5mo ago
Oh, some of mine are eslint errors, you're right
LukeAbby
LukeAbbyOP•5mo ago
you didn't take my words to heart
Eunomiac
Eunomiac•5mo ago
I told you, I did the Item part really fast because you wanted a push!
LukeAbby
LukeAbbyOP•5mo ago
even though you said this... :( LOL it's okay it's not like I'm actually mad
Eunomiac
Eunomiac•5mo ago
Look! I expressly said! 😉
LukeAbby
LukeAbbyOP•5mo ago
it should've been second nature by now!
Eunomiac
Eunomiac•5mo ago
lol I know, no worries you'd have to be a lot nastier to rattle me! 😉 But wait, what did I do wrong? I did what you did with the actor System type, to the item System type... right?
LukeAbby
LukeAbbyOP•5mo ago
Eunomiac
Eunomiac•5mo ago
Ohh, I missed the second one
LukeAbby
LukeAbbyOP•5mo ago
just to note again I think it's nicer if stuff like Move is defined as type Move = { ... } instead of interface Move { ... } because then you don't need the InterfaceToObject but yes the two errors left are really one and the same

Did you find this page helpful?