import { ISavedObjectTypeRegistry } from '../../saved_objects_type_registry' ; interface GetIndexForTypeOptions { type : string ; typeRegistry : ISavedObjectTypeRegistry ; kibanaVersion : string ; defaultIndex : string ; } export const getIndexForType = ( { type , typeRegistry , defaultIndex , kibanaVersion , } ) : string => { return `${ typeRegistry . getIndex ( type ) || defaultIndex }_${ kibanaVersion }` ; } ;