Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
This commit is contained in:
Iku-turso committed 2022-09-02 15:12:32 +03:00
1 parent 95babe245c
commit 64467b08ce
1 file changed
+3 -4
@@ -25,7 +25,7 @@ const telemetryDecoratorInjectable = getInjectable({
const emitTelemetry = diForDecorator.inject(emitTelemetryInjectable);
const whiteList = diForDecorator.inject(
telemetryWhiteListForFunctionsInjectable
telemetryWhiteListForFunctionsInjectable,
);
const shouldEmitTelemetry = shouldEmitTelemetryFor(whiteList);
@@ -61,9 +61,8 @@ const telemetryDecoratorInjectable = getInjectable({
injectionToken: instantiationDecoratorToken,
});
const shouldEmitTelemetryFor = (whiteList: string[]) => (
injectable: Injectable<any, any, any>,
) =>
const shouldEmitTelemetryFor =
(whiteList: string[]) => (injectable: Injectable<any, any, any>) =>
injectable.tags?.includes("emit-telemetry") ||
whiteList.includes(injectable.id);