#How do I Iterate through different child class variables and add them to a component?

2 messages · Page 1 of 1 (latest)

balmy oriole
#

How about a function in CodeFormatter that return the extra properties?

// In CodeFormatter
getExtraProperties(): yourType[] {
  // Return base properties (or nothing...)
}

Then you could use the same function in the inherited classes

// In PythonRequestsFormatter
getExtraProperties(): yourType[] {
  return [
    // Your extra properties,
    ...super.getExtraProperties()
  ];
}
tropic swift
#

Thanks. How about setting the extra properties? @balmy oriole