When trying to be more generic and use MetricWithAttribution with FIDMetricWithAttribution (or other XXXMetricWithAttribution) I get this Typescript error:
Type 'FIDMetricWithAttribution' is not assignable to type 'MetricWithAttribution'.
Types of property 'attribution' are incompatible.
Type 'FIDAttribution' is not assignable to type '{ [key: string]: unknown; }'.
Index signature for type 'string' is missing in type 'FIDAttribution'.
When trying to be more generic and use
MetricWithAttribution
withFIDMetricWithAttribution
(or otherXXXMetricWithAttribution
) I get this Typescript error:How to reproduce:
I fixed this by creating a "new"
MetricWithAttribution
with the correct types:The existing MetricWithAttribution definition should be updated or fixed to accommodate these use cases.