import { SavedObjectsClientContract } from 'kibana/public' ; import { EmbeddableStart } from '../services/embeddable' ; import { SavedObjectLoader , SavedObjectsStart } from '../services/saved_objects' ; import { createSavedDashboardClass } from './saved_dashboard' ; interface Services { savedObjectsClient : SavedObjectsClientContract ; savedObjects : SavedObjectsStart ; embeddableStart : EmbeddableStart ; } param services export function createSavedDashboardLoader ( { savedObjects , savedObjectsClient , embeddableStart , } ) { const SavedDashboard = createSavedDashboardClass ( savedObjects , embeddableStart , savedObjectsClient ) ; return new SavedObjectLoader ( SavedDashboard , savedObjectsClient ) ; }