@@ -674,21 +674,16 @@ export class PreAggregations {
674
674
675
675
/**
676
676
* Expand granularity into array of granularity hierarchy.
677
- * @param {string } dimension Dimension in the form of `cube.timeDimension`
678
- * @param {string } granularity Granularity
679
- * @returns {Array<string> }
680
677
*/
681
- const expandGranularity = ( dimension , granularity ) => (
678
+ const expandGranularity = ( dimension : string , granularity : string ) : Array < string > => (
682
679
transformedQuery . granularityHierarchies [ `${ dimension } .${ granularity } ` ] ||
683
680
[ granularity ]
684
681
) ;
685
682
686
683
/**
687
684
* Determine whether time dimensions match to the window granularity or not.
688
- * @param {PreAggregationReferences } references
689
- * @returns {boolean }
690
685
*/
691
- const windowGranularityMatches = ( references ) => {
686
+ const windowGranularityMatches = ( references : PreAggregationReferences ) : boolean => {
692
687
if ( ! transformedQuery . windowGranularity ) {
693
688
return true ;
694
689
}
@@ -708,10 +703,8 @@ export class PreAggregations {
708
703
709
704
/**
710
705
* Returns an array of 2-element arrays with dimension and granularity.
711
- * @param {* } timeDimension
712
- * @returns {Array<Array<string>> }
713
706
*/
714
- const expandTimeDimension = ( timeDimension ) => {
707
+ const expandTimeDimension = ( timeDimension : string [ ] ) : string [ ] [ ] => {
715
708
const [ dimension , resolvedGranularity ] = timeDimension ;
716
709
if ( ! resolvedGranularity ) {
717
710
return [ [ dimension , '*' ] ] ; // Any granularity should fit
0 commit comments