import { Embeddable , IContainer , ContainerInput } from '../../../../src/plugins/embeddable/public' ; import { TimeRange } from '../../../../src/plugins/data/public' ; import { TimeRangeInput } from './custom_time_range_action' ; interface ContainerTimeRangeInput extends ContainerInput < TimeRangeInput > { timeRange : TimeRange ; } export function canInheritTimeRange ( embeddable ) { if ( ! embeddable . parent ) { return false ; } const parent = embeddable . parent as IContainer < TimeRangeInput , ContainerTimeRangeInput > ; return parent . getInput ( ) . timeRange !== undefined ; }