import { Plugin , CoreSetup , CoreStart } from 'kibana/public' ; import '../types' ; export const plugin = ( ) => new CoreProviderPlugin ( ) ; class CoreProviderPlugin implements Plugin { private setupDeps ? : { core : CoreSetup ; plugins : Record < string , any > ; } ; public setup ( core , plugins ) { this . setupDeps = { core , plugins , } ; } public start ( core , plugins ) { window . _coreProvider = { setup : this . setupDeps ! , start : { core , plugins , } , testUtils : { delay : ( ms ) => new Promise ( ( res ) => setTimeout ( res , ms ) ) , } , } ; } public stop ( ) { } }