Helper function to be able to use enum as typed key in type and in interface when using forEach
See https://github.com/open-telemetry/opentelemetry-js/issues/3174
Helper function to be able to use enum as typed key in type and in interface when using forEach