@dereekb/date 13.2.2 → 13.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@dereekb/date",
3
- "version": "13.2.2",
3
+ "version": "13.3.1",
4
4
  "peerDependencies": {
5
- "@dereekb/rxjs": "13.2.2",
6
- "@dereekb/util": "13.2.2",
5
+ "@dereekb/rxjs": "13.3.1",
6
+ "@dereekb/util": "13.3.1",
7
7
  "@vvo/tzdb": "^6.0.0",
8
8
  "arktype": "^2.2.0",
9
9
  "date-fns": "^4.0.0",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "dependencies": {},
15
15
  "devDependencies": {
16
- "@dereekb/rxjs": "13.2.2"
16
+ "@dereekb/rxjs": "13.3.1"
17
17
  },
18
18
  "exports": {
19
19
  "./package.json": "./package.json",
@@ -1,4 +1,4 @@
1
- import { type Maybe, type SortCompareFunction, type RequiredOnKeys, type ArrayOrValue, type UniqueModel, type IndexNumber, type FactoryWithRequiredInput, type DateRelativeState } from '@dereekb/util';
1
+ import { type Maybe, type SortCompareFunction, type ArrayOrValue, type UniqueModel, type IndexNumber, type FactoryWithRequiredInput, type DateRelativeState } from '@dereekb/util';
2
2
  import { type DateCell, type DateOrDateCellIndex, type DateCellIndex } from './date.cell';
3
3
  import { type DateRange } from './date.range';
4
4
  /**
@@ -10,7 +10,7 @@ export interface DateCellRange extends DateCell {
10
10
  *
11
11
  * If not provided, assumes this has no range and starts/ends at the same index, i.
12
12
  */
13
- to?: DateCellIndex;
13
+ to?: Maybe<DateCellIndex>;
14
14
  }
15
15
  /**
16
16
  * Returns true if the input is a DateCellRange.
@@ -101,7 +101,7 @@ export type DateOrDateRangeOrDateCellIndexOrDateCellRange = DateRange | DateOrDa
101
101
  * @param i - starting cell index
102
102
  * @param to - ending cell index (inclusive); defaults to `i`
103
103
  */
104
- export declare function dateCellRange(i: number, to?: number): DateCellRangeWithRange;
104
+ export declare function dateCellRange(i: number, to?: Maybe<number>): DateCellRangeWithRange;
105
105
  /**
106
106
  * Creates a single-cell {@link DateCellRangeWithRange} where both `i` and `to` equal the given index.
107
107
  *
@@ -159,7 +159,9 @@ export declare function sortDateCellRanges<T extends DateCellRange>(input: T[]):
159
159
  /**
160
160
  * DateCellRange that is known to have a to value.
161
161
  */
162
- export type DateCellRangeWithRange = RequiredOnKeys<DateCellRange, 'to'>;
162
+ export type DateCellRangeWithRange = Omit<DateCellRange, 'to'> & {
163
+ to: DateCellIndex;
164
+ };
163
165
  /**
164
166
  * Merges an array of {@link DateCell} or {@link DateCellRange} values into the smallest set of
165
167
  * contiguous {@link DateCellRangeWithRange} values. Adjacent or overlapping ranges are combined.