I have a DOCUMENTATION_CATALOG that's defined like this:
export const DOCUMENTATION_CATALOG: {[key:string]:TopicCategory[]} = {}
We can get the TopicCategory array like this;
const values:TopicCategory[] =
Object.keys(DOCUMENTATION_CATALOG).map(
key => DOCUMENTATION_CATALOG[key])
When I extend TopicCategory with AbstractTopic I get the following error for the values variable:
const values: TopicCategory[] Type 'TopicCategory[][]' is not assignable to type 'TopicCategory[]'. Type 'TopicCategory[]' has no properties in common with type 'TopicCategory'.
This is the Stackblitz
I isolated it a little bit further. The error is not triggered if there are no properties inside TopicCategory.