@@ -38,20 +38,21 @@ export class MatPaginatorIntl {
38
38
lastPageLabel : string = 'Last page' ;
39
39
40
40
/** A label for the range of items within the current page and the length of the whole list. */
41
- getRangeLabel = ( page : number , pageSize : number , length : number ) => {
42
- if ( length == 0 || pageSize == 0 ) { return `0 of ${ length } ` ; }
41
+ getRangeLabel : ( page : number , pageSize : number , length : number ) => string =
42
+ ( page : number , pageSize : number , length : number ) => {
43
+ if ( length == 0 || pageSize == 0 ) { return `0 of ${ length } ` ; }
43
44
44
- length = Math . max ( length , 0 ) ;
45
+ length = Math . max ( length , 0 ) ;
45
46
46
- const startIndex = page * pageSize ;
47
+ const startIndex = page * pageSize ;
47
48
48
- // If the start index exceeds the list length, do not try and fix the end index to the end.
49
- const endIndex = startIndex < length ?
50
- Math . min ( startIndex + pageSize , length ) :
51
- startIndex + pageSize ;
49
+ // If the start index exceeds the list length, do not try and fix the end index to the end.
50
+ const endIndex = startIndex < length ?
51
+ Math . min ( startIndex + pageSize , length ) :
52
+ startIndex + pageSize ;
52
53
53
- return `${ startIndex + 1 } – ${ endIndex } of ${ length } ` ;
54
- }
54
+ return `${ startIndex + 1 } – ${ endIndex } of ${ length } ` ;
55
+ }
55
56
}
56
57
57
58
/** @docs -private */
0 commit comments