diff --git a/libs/providers/go-feature-flag/src/lib/data-collector-hook.ts b/libs/providers/go-feature-flag/src/lib/data-collector-hook.ts index 14f2cbfb2..f4f8ab534 100644 --- a/libs/providers/go-feature-flag/src/lib/data-collector-hook.ts +++ b/libs/providers/go-feature-flag/src/lib/data-collector-hook.ts @@ -12,12 +12,13 @@ import { CollectorError } from './errors/collector-error'; import { GoffApiController } from './controller/goff-api'; const defaultTargetingKey = 'undefined-targetingKey'; +type Timer = ReturnType; export class GoFeatureFlagDataCollectorHook implements Hook { // collectUnCachedEvent (optional) set to true if you want to send all events not only the cached evaluations. collectUnCachedEvaluation?: boolean; // bgSchedulerId contains the id of the setInterval that is running. - private bgScheduler?: NodeJS.Timeout | number; + private bgScheduler?: Timer; // dataCollectorBuffer contains all the FeatureEvents that we need to send to the relay-proxy for data collection. private dataCollectorBuffer?: FeatureEvent[]; // dataFlushInterval interval time (in millisecond) we use to call the relay proxy to collect data.