import { TimeRange } from './types' ; export const isTimeRange = ( x ) : x is TimeRange => ! ! x && typeof x === 'object' && typeof ( x as TimeRange ) . from === 'string' && typeof ( x as TimeRange ) . to === 'string' ;