param collectionQuery param order export const setOrders = ( collectionQuery , orders ) : firebase . default . firestore . Query => { orders . forEach ( ( filter ) => { const field = filter [ 'key' ] ; const order = filter [ 'value' ] ; collectionQuery = collectionQuery . orderBy ( field , order ) ; } ) ; return collectionQuery ; } ;