-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(aggregators): add better TS typing for all Aggregators
- Loading branch information
1 parent
f4d3843
commit 1518d6a
Showing
14 changed files
with
93 additions
and
92 deletions.
There are no files selected for viewing
14 changes: 7 additions & 7 deletions
14
packages/common/src/grouping-formatters/avgTotalsDollarFormatter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
packages/common/src/grouping-formatters/avgTotalsFormatter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
packages/common/src/grouping-formatters/avgTotalsPercentageFormatter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
packages/common/src/grouping-formatters/maxTotalsFormatter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
packages/common/src/grouping-formatters/minTotalsFormatter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
packages/common/src/grouping-formatters/sumTotalsBoldFormatter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
packages/common/src/grouping-formatters/sumTotalsColoredFormatter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
packages/common/src/grouping-formatters/sumTotalsDollarBoldFormatter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
packages/common/src/grouping-formatters/sumTotalsDollarColoredBoldFormatter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
packages/common/src/grouping-formatters/sumTotalsDollarColoredFormatter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
packages/common/src/grouping-formatters/sumTotalsDollarFormatter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
packages/common/src/grouping-formatters/sumTotalsFormatter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
export interface Aggregator { | ||
/** Aggregator associated Field Id */ | ||
field?: number | string; | ||
/** Column definition field Id of the associated Aggregator */ | ||
field: number | string; | ||
|
||
/** Aggregator associated type */ | ||
type?: string; | ||
/** Type of Aggregator (sum, avg, ...) */ | ||
type: string; | ||
|
||
/** Aggregator initialize method */ | ||
init: () => void; | ||
|
||
/** Mathod to accumulate the result with different logic depending on each aggregator type */ | ||
/** Method to accumulate the result which will be different for each Aggregator type */ | ||
accumulate?: (item: any) => void; | ||
|
||
/** Method to store the result into the given group total argument provided */ | ||
storeResult?: (groupTotals: any | undefined) => void; | ||
/** Method to store the result into the given group total object provided as argument */ | ||
storeResult: (groupTotals: any | undefined) => void; | ||
} |
3 changes: 2 additions & 1 deletion
3
packages/common/src/interfaces/groupTotalsFormatter.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import { Column } from './column.interface'; | ||
import { SlickGrid } from './slickGrid.interface'; | ||
|
||
export type GroupTotalsFormatter = (totals: any, columnDef: Column, grid?: any) => string; | ||
export type GroupTotalsFormatter = (totals: any, columnDef: Column, grid: SlickGrid) => string; |