Skip to content

Commit

Permalink
Rebuild.
Browse files Browse the repository at this point in the history
  • Loading branch information
msqr committed Sep 27, 2023
1 parent ca56a11 commit 92cec19
Show file tree
Hide file tree
Showing 32 changed files with 402 additions and 84 deletions.
14 changes: 14 additions & 0 deletions lib/main/Comparable.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* API for a comparison between similar objects.
* @public
*/
export default interface Comparable<T> {
/**
* Compare this instance to another.
*
* @param o - the object to compare to
* @returns `-1`, `0`, or `1` if this is less than, equal to, or greater than `o`
*/
compareTo(o: T): number;
}
//# sourceMappingURL=Comparable.d.ts.map
1 change: 1 addition & 0 deletions lib/main/Comparable.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions lib/main/Comparable.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/main/Comparable.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 3 additions & 19 deletions lib/main/IntRange.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Comparable from "./Comparable.js";
/**
* The default unbounded display value.
* @public
Expand All @@ -22,7 +23,7 @@ export interface IntRangeFormatOptions {
*
* @public
*/
export default class IntRange {
export default class IntRange implements Comparable<IntRange> {
#private;
/**
* Constructor.
Expand Down Expand Up @@ -143,26 +144,9 @@ export default class IntRange {
*
* @param o - the range to compare to
* @returns `-1`, `0`, or `1` if this is less than, equal to, or greater than `o`
* @override
*/
compareTo(o: IntRange): number;
/**
* Compare two ranges.
*
* This function is useful for sorting arrays, for example:
*
* ```ts
* const data = [new IntRange(2, 3), new IntRange(0, 2)];
* data.sort(IntRange.compare);
*
* // now data like [ [0..2], [2..3] ]
* ```
*
* @param l - the left value
* @param r - the right value
* @returns `-1`, `0`, or `1` if `l` is less than, equal to, or greater than `r`
* @see {@link IntRange.compareTo | compareTo()}
*/
static compare(l: IntRange, r: IntRange): number;
/**
* Test for equality.
*
Expand Down
2 changes: 1 addition & 1 deletion lib/main/IntRange.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 1 addition & 26 deletions lib/main/IntRange.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/main/IntRange.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 92cec19

Please sign in to comment.