import { CollectorSet , Collector } from '../../plugins/usage_collection/server/collector' ; import { loggerMock } from '../../core/server/logging/logger.mock' ; const collectorSet = new CollectorSet ( { logger : loggerMock . create ( ) , maximumWaitTimeForAllCollectorsInS : 0 , } ) ; interface Usage { locale ? : string ; } export class NestedInside { collector ? : Collector < Usage > ; createMyCollector ( ) { this . collector = collectorSet . makeUsageCollector < Usage > ( { type : 'my_nested_collector' , isReady : ( ) => true , fetch : async ( ) => { return { locale : 'en' , } ; } , schema : { locale : { type : 'keyword' , } , } , } ) ; } }