Skip to content

Commit cb9a0a3

Browse files
committed
type reducer label
1 parent de388b8 commit cb9a0a3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/reducer.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ export type ReducerName =
2929

3030
export type ReducerFunction = (values: any[]) => any;
3131

32-
// TODO label
33-
export type ReducerImplementation<T> =
32+
export type ReducerImplementation<T> = (
3433
| {
3534
reduce: T;
3635
scale?: Channel["scale"];
@@ -41,7 +40,8 @@ export type ReducerImplementation<T> =
4140
| {
4241
reduce(index: number[], values: any[], summary?: any): any;
4342
scope: "data" | "facet";
44-
};
43+
}
44+
) & {label?: string | null};
4545

4646
export type Reducer = ReducerName | ReducerFunction | ReducerImplementation<ReducerName>;
4747

0 commit comments

Comments
 (0)