Skip to content

Commit 650cd22

Browse files
authored
jsdoc,comment: Copy 2 tiny additions from my fork (#1975)
* comment: Copy in a comment from my fork, explaining regex * jsdoc: Document Grouper.reverse
1 parent 8d15862 commit 650cd22

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/Query/Filter/Field.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ export abstract class Field {
342342
throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);
343343
}
344344

345+
// The $ at end is required to distinguish between group by status and status.name
345346
return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`);
346347
}
347348

src/Query/Grouper.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ export class Grouper {
3434
*/
3535
public readonly grouper: GrouperFunction;
3636

37+
/**
38+
* Whether the headings for this group should be reversed.
39+
*/
3740
public readonly reverse: boolean;
3841

3942
constructor(property: string, grouper: GrouperFunction, reverse: boolean) {

0 commit comments

Comments
 (0)