@@ -41,7 +41,9 @@ interface AggregatorInstance {
4141 format ?: Formatter | ( ( x : any ) => string )
4242 numInputs ?: number
4343}
44-
44+ interface PivotDataContext {
45+ getAggregator : ( rowKey : any [ ] , colKey : any [ ] ) => AggregatorInstance
46+ }
4547type AggregatorFunction = ( data ?: PivotDataContext , rowKey ?: any [ ] , colKey ?: any [ ] ) => AggregatorInstance
4648type AggregatorTemplate = ( ...args : any [ ] ) => AggregatorFunction
4749
@@ -81,10 +83,6 @@ interface PivotDataProps {
8183 derivedAttributes ?: Record < string , ( record : DataRecord ) => RecordValue >
8284}
8385
84- interface PivotDataContext {
85- getAggregator : ( rowKey : any [ ] , colKey : any [ ] ) => AggregatorInstance
86- }
87-
8886// ==================== Locale 관련 타입 ====================
8987interface LocaleStrings {
9088 renderError : string
@@ -209,8 +207,8 @@ const naturalSort: SortFunction = (as: any, bs: any): number => {
209207 }
210208
211209 // finally, "smart" string sorting
212- let a = String ( as )
213- let b = String ( bs )
210+ const a = String ( as )
211+ const b = String ( bs )
214212 if ( a === b ) {
215213 return 0
216214 }
@@ -353,7 +351,7 @@ const aggregatorTemplates: AggregatorTemplates = {
353351 ) ,
354352 push ( record : DataRecord ) {
355353 const raw = record ?. [ attr ]
356- let x = raw
354+ const x = raw
357355 if ( [ 'min' , 'max' ] . includes ( mode ) ) {
358356 const numX = x != null ? parseFloat ( String ( x ) ) : NaN
359357 if ( ! isNaN ( numX ) ) {
@@ -1000,4 +998,4 @@ export {
1000998 getSort ,
1001999 sortAs ,
10021000 PivotData
1003- }
1001+ }
0 commit comments