mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-24 11:50:59 +08:00
Add test for crossfilter.groupAll()
This commit is contained in:
1 parent
0e6151e5e3
commit
66f219903a
1 file changed
+5
@@ -24,6 +24,11 @@ var payments = crossfilter<Payment>([
|
||||
{date: "2011-11-14T17:29:52Z", quantity: 1, total: 200, tip: 100, type: "visa"}
|
||||
]);
|
||||
|
||||
var total_payments : number = payments.groupAll<number>().reduce(
|
||||
function(p,v) { return p+=v; },
|
||||
function(p,v) { return p-=v; },
|
||||
function() { return 0; } ).value();
|
||||
|
||||
var paymentsByTotal = payments.dimension((d) => d.total);
|
||||
|
||||
// Filters
|
||||
|
||||
Reference in new issue
Block a user