@naturalcycles/js-lib 14.181.0 → 14.181.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.
@@ -96,10 +96,10 @@ export declare class LocalDate {
96
96
  /**
97
97
  * Shortcut wrapper around `LocalDate.parse` / `LocalDate.today`
98
98
  */
99
- export declare function localDate(d?: LocalDateInput): LocalDate;
99
+ export declare function localDate(d?: LocalDateInput | null): LocalDate;
100
100
  /**
101
101
  * Creates a LocalDate from the input, unless it's falsy - then returns undefined.
102
102
  *
103
103
  * `localDate` function will instead return LocalDate of today for falsy input.
104
104
  */
105
- export declare function localDateOrUndefined(d?: LocalDateInput): LocalDate | undefined;
105
+ export declare function localDateOrUndefined(d?: LocalDateInput | null): LocalDate | undefined;
@@ -125,10 +125,10 @@ export declare class LocalTime {
125
125
  /**
126
126
  * Shortcut wrapper around `LocalDate.parse` / `LocalDate.today`
127
127
  */
128
- export declare function localTime(d?: LocalTimeInput): LocalTime;
128
+ export declare function localTime(d?: LocalTimeInput | null): LocalTime;
129
129
  /**
130
130
  * Creates a LocalTime from the input, unless it's falsy - then returns undefined.
131
131
  *
132
132
  * `localTime` function will instead return LocalTime of `now` for falsy input.
133
133
  */
134
- export declare function localTimeOrUndefined(d?: LocalTimeInput): LocalTime | undefined;
134
+ export declare function localTimeOrUndefined(d?: LocalTimeInput | null): LocalTime | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/js-lib",
3
- "version": "14.181.0",
3
+ "version": "14.181.1",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "build-prod": "build-prod-esm-cjs",
@@ -507,7 +507,7 @@ export class LocalDate {
507
507
  /**
508
508
  * Shortcut wrapper around `LocalDate.parse` / `LocalDate.today`
509
509
  */
510
- export function localDate(d?: LocalDateInput): LocalDate {
510
+ export function localDate(d?: LocalDateInput | null): LocalDate {
511
511
  return d ? LocalDate.of(d) : LocalDate.today()
512
512
  }
513
513
 
@@ -516,6 +516,6 @@ export function localDate(d?: LocalDateInput): LocalDate {
516
516
  *
517
517
  * `localDate` function will instead return LocalDate of today for falsy input.
518
518
  */
519
- export function localDateOrUndefined(d?: LocalDateInput): LocalDate | undefined {
519
+ export function localDateOrUndefined(d?: LocalDateInput | null): LocalDate | undefined {
520
520
  return d ? LocalDate.of(d) : undefined
521
521
  }
@@ -599,7 +599,7 @@ export class LocalTime {
599
599
  /**
600
600
  * Shortcut wrapper around `LocalDate.parse` / `LocalDate.today`
601
601
  */
602
- export function localTime(d?: LocalTimeInput): LocalTime {
602
+ export function localTime(d?: LocalTimeInput | null): LocalTime {
603
603
  return d ? LocalTime.of(d) : LocalTime.now()
604
604
  }
605
605
 
@@ -608,7 +608,7 @@ export function localTime(d?: LocalTimeInput): LocalTime {
608
608
  *
609
609
  * `localTime` function will instead return LocalTime of `now` for falsy input.
610
610
  */
611
- export function localTimeOrUndefined(d?: LocalTimeInput): LocalTime | undefined {
611
+ export function localTimeOrUndefined(d?: LocalTimeInput | null): LocalTime | undefined {
612
612
  return d ? LocalTime.of(d) : undefined
613
613
  }
614
614