import { HistoryQuery } from '@empathyco/x-types' ; import { deepMerge } from '@empathyco/x-deep-merge' ; import { DeepPartial } from '../utils/types' ; param historyQuery returns internal export function createHistoryQuery ( historyQuery ) { const defaults = { modelName : 'HistoryQuery' , timestamp : Date . now ( ) , query : '' } ; return deepMerge ( defaults , historyQuery ) ; } param queries returns internal export function createHistoryQueries ( ... queries ) { return queries . map ( query => createHistoryQuery ( { query } ) ) ; }