File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
packages/cubejs-client-core Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -673,6 +673,14 @@ declare module '@cubejs-client/core' {
673
673
type TCubeDimension = TCubeMember & {
674
674
suggestFilterValues : boolean ;
675
675
} ;
676
+
677
+ type TCubeSegment = Pick < TCubeMember , "name" | 'shortTitle' | "title" >
678
+
679
+ type TCubeMemberByType < T > =
680
+ T extends "measures" ? TCubeMeasure :
681
+ T extends "dimensions" ? TCubeDimension :
682
+ T extends "segments" ? TCubeSegment :
683
+ never
676
684
677
685
type TDryRunResponse = {
678
686
queryType : QueryType ;
@@ -709,7 +717,7 @@ declare module '@cubejs-client/core' {
709
717
* @param memberName - Fully qualified member name in a form `Cube.memberName`
710
718
* @return An object containing meta information about member
711
719
*/
712
- resolveMember ( memberName : string , memberType : MemberType ) : Object ;
720
+ resolveMember < T extends MemberType > ( memberName : string , memberType : T ) : { title : string , error : string } | TCubeMemberByType < T > ;
713
721
defaultTimeDimensionNameFor ( memberName : string ) : string ;
714
722
filterOperatorsForMember ( memberName : string , memberType : MemberType ) : any ;
715
723
}
You can’t perform that action at this time.
0 commit comments