Skip to content

Commit

Permalink
🤖 Merge PR DefinitelyTyped#71651 Fix return type of compareBegin and …
Browse files Browse the repository at this point in the history
…compareEnd methods of strange ranges by @dhritzkiv
  • Loading branch information
dhritzkiv authored Jan 16, 2025
1 parent 7e0f7c2 commit b2a5f48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/strange/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ interface Range<T extends Range.Endpoint> {
* new Range(5, 10).compareBegin(0) // => 1
* new Range(5, 10).compareBegin(null) // => 1
*/
compareBegin(begin: T | null): -1 | 0 | 0;
compareBegin(begin: T | null): -1 | 0 | 1;

/**
* Compares this range's end with the given value.
Expand All @@ -179,7 +179,7 @@ interface Range<T extends Range.Endpoint> {
* new Range(0, 5).compareEnd(10) // => 1
* new Range(0, 5).compareEnd(null) // => -1
*/
compareEnd(end: T | null): -1 | 0 | 0;
compareEnd(end: T | null): -1 | 0 | 1;

/**
* Check whether the range is empty.
Expand Down

0 comments on commit b2a5f48

Please sign in to comment.