import { Query } from './types' ; export const isQuery = ( x ) : x is Query => ! ! x && typeof x === 'object' && typeof ( x as Query ) . language === 'string' && ( typeof ( x as Query ) . query === 'string' || ( typeof ( x as Query ) . query === 'object' && ! ! ( x as Query ) . query ) ) ;