@synnaxlabs/x 0.44.4 → 0.45.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/.turbo/turbo-build.log +38 -38
- package/dist/{base-BORMP3mH.js → base-DRybODwJ.js} +7 -6
- package/dist/base-KIBsp6TI.cjs +1 -0
- package/dist/binary.cjs +1 -1
- package/dist/binary.js +1 -1
- package/dist/{bounds-BXbqBINt.cjs → bounds-C2TKFgVk.cjs} +1 -1
- package/dist/{bounds-BQqppNFf.js → bounds-DeUXrllt.js} +11 -11
- package/dist/bounds.cjs +1 -1
- package/dist/bounds.js +1 -1
- package/dist/{box-DRH5SOaY.js → box-BYuq-Gjx.js} +4 -4
- package/dist/{box-qgxWXNhm.cjs → box-Blu-4d1n.cjs} +1 -1
- package/dist/box.cjs +1 -1
- package/dist/box.js +1 -1
- package/dist/caseconv.cjs +1 -1
- package/dist/caseconv.js +1 -1
- package/dist/compare.cjs +1 -1
- package/dist/compare.js +1 -1
- package/dist/deep.cjs +1 -1
- package/dist/deep.js +211 -99
- package/dist/{dimensions-qY12pyfC.cjs → dimensions-Cg5Owbwn.cjs} +1 -1
- package/dist/{dimensions-RaRkesPq.js → dimensions-DC0uLPwn.js} +1 -1
- package/dist/dimensions.cjs +1 -1
- package/dist/dimensions.js +1 -1
- package/dist/{direction-DKdfJwj7.js → direction-C_b4tfRN.js} +1 -1
- package/dist/{direction-XCdrc4is.cjs → direction-DqQB9M37.cjs} +1 -1
- package/dist/direction.cjs +1 -1
- package/dist/direction.js +1 -1
- package/dist/external-CtHGFcox.cjs +1 -0
- package/dist/{external-BM_NS5yM.js → external-tyaEMW4S.js} +1 -1
- package/dist/get-CXkBfLu1.js +82 -0
- package/dist/get-OP63N4c3.cjs +1 -0
- package/dist/{index-B5l_quQn.js → index-BHXRDFYj.js} +1 -1
- package/dist/index-Bxlv0uf_.js +57 -0
- package/dist/{index-CBMHFqs4.js → index-C452Pas0.js} +25 -22
- package/dist/{index-BQe8OIgm.cjs → index-CwGPVvbl.cjs} +1 -1
- package/dist/index-uDxeM-cl.cjs +1 -0
- package/dist/index-xaxa1hoa.cjs +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.js +442 -380
- package/dist/location-BPoXwOni.cjs +1 -0
- package/dist/{location-CGLioInQ.js → location-CVxysrHI.js} +31 -30
- package/dist/location.cjs +1 -1
- package/dist/location.js +1 -1
- package/dist/{scale-76Azh2EE.cjs → scale-BHs716im.cjs} +1 -1
- package/dist/{scale-BhIvACdB.js → scale-DjxC6ep2.js} +4 -4
- package/dist/scale.cjs +1 -1
- package/dist/scale.js +1 -1
- package/dist/series-C6ZwNf8i.cjs +6 -0
- package/dist/{series-kgnLXSDr.js → series-W5Aafjeu.js} +268 -251
- package/dist/{spatial-QY891r0E.js → spatial-DnsaOypA.js} +1 -1
- package/dist/{spatial-BsGadoUr.cjs → spatial-DrxzaD5U.cjs} +1 -1
- package/dist/spatial.cjs +1 -1
- package/dist/spatial.js +8 -8
- package/dist/src/caseconv/caseconv.d.ts +9 -0
- package/dist/src/caseconv/caseconv.d.ts.map +1 -1
- package/dist/src/color/color.d.ts +7 -0
- package/dist/src/color/color.d.ts.map +1 -1
- package/dist/src/deep/copy.spec.d.ts +2 -0
- package/dist/src/deep/copy.spec.d.ts.map +1 -0
- package/dist/src/deep/external.d.ts +3 -1
- package/dist/src/deep/external.d.ts.map +1 -1
- package/dist/src/deep/get.bench.d.ts +2 -0
- package/dist/src/deep/get.bench.d.ts.map +1 -0
- package/dist/src/deep/get.d.ts +16 -0
- package/dist/src/deep/get.d.ts.map +1 -0
- package/dist/src/deep/get.spec.d.ts +2 -0
- package/dist/src/deep/get.spec.d.ts.map +1 -0
- package/dist/src/deep/partial.spec.d.ts +2 -0
- package/dist/src/deep/partial.spec.d.ts.map +1 -0
- package/dist/src/deep/path.d.ts +4 -92
- package/dist/src/deep/path.d.ts.map +1 -1
- package/dist/src/deep/remove.bench.d.ts +2 -0
- package/dist/src/deep/remove.bench.d.ts.map +1 -0
- package/dist/src/deep/remove.d.ts +2 -0
- package/dist/src/deep/remove.d.ts.map +1 -0
- package/dist/src/deep/remove.spec.d.ts +2 -0
- package/dist/src/deep/remove.spec.d.ts.map +1 -0
- package/dist/src/deep/set.bench.d.ts +2 -0
- package/dist/src/deep/set.bench.d.ts.map +1 -0
- package/dist/src/deep/set.d.ts +2 -0
- package/dist/src/deep/set.d.ts.map +1 -0
- package/dist/src/deep/set.spec.d.ts +2 -0
- package/dist/src/deep/set.spec.d.ts.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/primitive/primitive.d.ts +4 -0
- package/dist/src/primitive/primitive.d.ts.map +1 -1
- package/dist/src/spatial/location/location.d.ts +2 -2
- package/dist/src/spatial/location/location.d.ts.map +1 -1
- package/dist/src/status/status.d.ts +2 -1
- package/dist/src/status/status.d.ts.map +1 -1
- package/dist/src/telem/series.d.ts +1 -0
- package/dist/src/telem/series.d.ts.map +1 -1
- package/dist/src/telem/telem.d.ts +15 -6
- package/dist/src/telem/telem.d.ts.map +1 -1
- package/dist/src/undefined.d.ts +2 -0
- package/dist/src/undefined.d.ts.map +1 -0
- package/dist/telem.cjs +1 -1
- package/dist/telem.js +1 -1
- package/dist/{xy-BKIJiLu_.cjs → xy-DWwtHmgn.cjs} +1 -1
- package/dist/{xy-CBuhMaIo.js → xy-DYPw8-8C.js} +1 -1
- package/dist/xy.cjs +1 -1
- package/dist/xy.js +1 -1
- package/dist/zod.cjs +1 -1
- package/dist/zod.js +1 -1
- package/package.json +4 -4
- package/src/caseconv/caseconv.spec.ts +30 -0
- package/src/caseconv/caseconv.ts +46 -0
- package/src/color/color.spec.ts +40 -0
- package/src/color/color.ts +72 -0
- package/src/deep/copy.spec.ts +148 -0
- package/src/deep/external.ts +3 -1
- package/src/deep/get.bench.ts +170 -0
- package/src/deep/get.spec.ts +196 -0
- package/src/deep/get.ts +79 -0
- package/src/deep/partial.spec.ts +194 -0
- package/src/deep/path.spec.ts +92 -183
- package/src/deep/path.ts +27 -198
- package/src/deep/remove.bench.ts +238 -0
- package/src/deep/remove.spec.ts +219 -0
- package/src/deep/remove.ts +102 -0
- package/src/deep/set.bench.ts +208 -0
- package/src/deep/set.spec.ts +369 -0
- package/src/deep/set.ts +91 -0
- package/src/index.ts +1 -0
- package/src/primitive/primitive.spec.ts +9 -0
- package/src/primitive/primitive.ts +9 -0
- package/src/spatial/location/location.ts +2 -0
- package/src/status/status.spec.ts +52 -0
- package/src/status/status.ts +19 -6
- package/src/telem/series.ts +2 -0
- package/src/telem/telem.spec.ts +302 -0
- package/src/telem/telem.ts +60 -18
- package/src/undefined.ts +14 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/base-BLNViP3D.cjs +0 -1
- package/dist/external-E3ErJeeM.cjs +0 -1
- package/dist/index-D2xcvEO5.js +0 -46
- package/dist/index-DOJlZHqJ.cjs +0 -1
- package/dist/index-DdhM_E4k.cjs +0 -1
- package/dist/location-DJ_K4SlP.cjs +0 -1
- package/dist/path-Blh4wJuA.js +0 -110
- package/dist/path-CPSfCjde.cjs +0 -1
- package/dist/series-tAhThbnz.cjs +0 -6
- package/dist/src/deep/delete.d.ts +0 -3
- package/dist/src/deep/delete.d.ts.map +0 -1
- package/dist/src/deep/delete.spec.d.ts +0 -2
- package/dist/src/deep/delete.spec.d.ts.map +0 -1
- package/src/deep/delete.spec.ts +0 -73
- package/src/deep/delete.ts +0 -27
package/src/telem/telem.ts
CHANGED
|
@@ -109,6 +109,7 @@ export class TimeStamp
|
|
|
109
109
|
if (value === Infinity) value = TimeStamp.MAX;
|
|
110
110
|
else value = TimeStamp.MIN;
|
|
111
111
|
}
|
|
112
|
+
if (primitive.isCrudeValueExtension<bigint>(value)) value = value.value;
|
|
112
113
|
super(BigInt(value.valueOf()) + offset);
|
|
113
114
|
}
|
|
114
115
|
}
|
|
@@ -443,6 +444,23 @@ export class TimeStamp
|
|
|
443
444
|
return this.date().getUTCHours();
|
|
444
445
|
}
|
|
445
446
|
|
|
447
|
+
/**
|
|
448
|
+
* @returns the integer hour that the timestamp corresponds to within its day in local time.
|
|
449
|
+
*/
|
|
450
|
+
get localHour(): number {
|
|
451
|
+
return this.date().getHours();
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* @returns a copy of the timestamp with the hour changed.
|
|
456
|
+
* @param hour the value to set the hour to.
|
|
457
|
+
*/
|
|
458
|
+
setLocalHour(hour: number): TimeStamp {
|
|
459
|
+
const d = this.date();
|
|
460
|
+
d.setHours(hour);
|
|
461
|
+
return new TimeStamp(d);
|
|
462
|
+
}
|
|
463
|
+
|
|
446
464
|
/**
|
|
447
465
|
* @returns a copy of the timestamp with the hour changed.
|
|
448
466
|
* @param hour the value to set the hour to.
|
|
@@ -450,7 +468,7 @@ export class TimeStamp
|
|
|
450
468
|
setHour(hour: number): TimeStamp {
|
|
451
469
|
const d = this.date();
|
|
452
470
|
d.setUTCHours(hour);
|
|
453
|
-
return new TimeStamp(d
|
|
471
|
+
return new TimeStamp(d);
|
|
454
472
|
}
|
|
455
473
|
|
|
456
474
|
/** @returns the integer minute that the timestamp corresponds to within its hour. */
|
|
@@ -680,6 +698,7 @@ export class TimeSpan
|
|
|
680
698
|
{
|
|
681
699
|
constructor(value: CrudeTimeSpan) {
|
|
682
700
|
if (typeof value === "number") value = Math.trunc(value.valueOf());
|
|
701
|
+
if (primitive.isCrudeValueExtension<bigint>(value)) value = value.value;
|
|
683
702
|
super(BigInt(value.valueOf()));
|
|
684
703
|
}
|
|
685
704
|
|
|
@@ -693,6 +712,7 @@ export class TimeSpan
|
|
|
693
712
|
if (span instanceof TimeSpan) return span;
|
|
694
713
|
if (span instanceof Rate) return span.period;
|
|
695
714
|
if (span instanceof TimeStamp) return new TimeSpan(span);
|
|
715
|
+
if (primitive.isCrudeValueExtension<bigint>(span)) span = span.value;
|
|
696
716
|
if (["number", "bigint"].includes(typeof span)) return TimeSpan.seconds(span);
|
|
697
717
|
return new TimeSpan(span);
|
|
698
718
|
}
|
|
@@ -707,6 +727,7 @@ export class TimeSpan
|
|
|
707
727
|
if (span instanceof TimeSpan) return span;
|
|
708
728
|
if (span instanceof Rate) return span.period;
|
|
709
729
|
if (span instanceof TimeStamp) return new TimeSpan(span);
|
|
730
|
+
if (primitive.isCrudeValueExtension<bigint>(span)) span = span.value;
|
|
710
731
|
if (["number", "bigint"].includes(typeof span)) return TimeSpan.milliseconds(span);
|
|
711
732
|
return new TimeSpan(span);
|
|
712
733
|
}
|
|
@@ -1022,6 +1043,7 @@ export class Rate
|
|
|
1022
1043
|
implements primitive.Stringer
|
|
1023
1044
|
{
|
|
1024
1045
|
constructor(value: CrudeRate) {
|
|
1046
|
+
if (primitive.isCrudeValueExtension<number>(value)) value = value.value;
|
|
1025
1047
|
super(value.valueOf());
|
|
1026
1048
|
}
|
|
1027
1049
|
|
|
@@ -1083,7 +1105,7 @@ export class Rate
|
|
|
1083
1105
|
* @returns A TimeSpan that corresponds to the given number of bytes.
|
|
1084
1106
|
*/
|
|
1085
1107
|
byteSpan(size: Size, density: CrudeDensity): TimeSpan {
|
|
1086
|
-
return this.span(size.valueOf() / density.valueOf());
|
|
1108
|
+
return this.span(size.valueOf() / new Density(density).valueOf());
|
|
1087
1109
|
}
|
|
1088
1110
|
|
|
1089
1111
|
/**
|
|
@@ -1093,7 +1115,7 @@ export class Rate
|
|
|
1093
1115
|
* @returns A new Rate representing the sum of the two rates.
|
|
1094
1116
|
*/
|
|
1095
1117
|
add(other: CrudeRate): Rate {
|
|
1096
|
-
return new Rate(math.add(this.valueOf(), other.valueOf()));
|
|
1118
|
+
return new Rate(math.add(this.valueOf(), new Rate(other).valueOf()));
|
|
1097
1119
|
}
|
|
1098
1120
|
|
|
1099
1121
|
/**
|
|
@@ -1103,7 +1125,7 @@ export class Rate
|
|
|
1103
1125
|
* @returns A new Rate representing the difference of the two rates.
|
|
1104
1126
|
*/
|
|
1105
1127
|
sub(other: CrudeRate): Rate {
|
|
1106
|
-
return new Rate(math.sub(this.valueOf(), other.valueOf()));
|
|
1128
|
+
return new Rate(math.sub(this.valueOf(), new Rate(other).valueOf()));
|
|
1107
1129
|
}
|
|
1108
1130
|
|
|
1109
1131
|
/**
|
|
@@ -1166,6 +1188,7 @@ export class Density
|
|
|
1166
1188
|
* @returns A Density representing the given number of bytes per value.
|
|
1167
1189
|
*/
|
|
1168
1190
|
constructor(value: CrudeDensity) {
|
|
1191
|
+
if (primitive.isCrudeValueExtension<number>(value)) value = value.value;
|
|
1169
1192
|
super(value.valueOf());
|
|
1170
1193
|
}
|
|
1171
1194
|
|
|
@@ -1196,7 +1219,7 @@ export class Density
|
|
|
1196
1219
|
* @returns A new Density representing the sum of the two densities.
|
|
1197
1220
|
*/
|
|
1198
1221
|
add(other: CrudeDensity): Density {
|
|
1199
|
-
return new Density(math.add(this.valueOf(), other.valueOf()));
|
|
1222
|
+
return new Density(math.add(this.valueOf(), new Density(other).valueOf()));
|
|
1200
1223
|
}
|
|
1201
1224
|
|
|
1202
1225
|
/**
|
|
@@ -1206,7 +1229,7 @@ export class Density
|
|
|
1206
1229
|
* @returns A new Density representing the difference of the two densities.
|
|
1207
1230
|
*/
|
|
1208
1231
|
sub(other: CrudeDensity): Density {
|
|
1209
|
-
return new Density(math.sub(this.valueOf(), other.valueOf()));
|
|
1232
|
+
return new Density(math.sub(this.valueOf(), new Density(other).valueOf()));
|
|
1210
1233
|
}
|
|
1211
1234
|
|
|
1212
1235
|
/**
|
|
@@ -1533,6 +1556,7 @@ export class DataType
|
|
|
1533
1556
|
implements primitive.Stringer
|
|
1534
1557
|
{
|
|
1535
1558
|
constructor(value: CrudeDataType) {
|
|
1559
|
+
if (primitive.isCrudeValueExtension<string>(value)) value = value.value;
|
|
1536
1560
|
if (
|
|
1537
1561
|
value instanceof DataType ||
|
|
1538
1562
|
typeof value === "string" ||
|
|
@@ -1815,26 +1839,31 @@ export class Size
|
|
|
1815
1839
|
implements primitive.Stringer
|
|
1816
1840
|
{
|
|
1817
1841
|
constructor(value: CrudeSize) {
|
|
1842
|
+
if (primitive.isCrudeValueExtension<number>(value)) value = value.value;
|
|
1818
1843
|
super(value.valueOf());
|
|
1819
1844
|
}
|
|
1820
1845
|
|
|
1821
1846
|
/** @returns true if the Size is larger than the other size. */
|
|
1822
1847
|
largerThan(other: CrudeSize): boolean {
|
|
1848
|
+
if (primitive.isCrudeValueExtension<number>(other)) other = other.value;
|
|
1823
1849
|
return this.valueOf() > other.valueOf();
|
|
1824
1850
|
}
|
|
1825
1851
|
|
|
1826
1852
|
/** @returns true if the Size is smaller than the other size. */
|
|
1827
1853
|
smallerThan(other: CrudeSize): boolean {
|
|
1854
|
+
if (primitive.isCrudeValueExtension<number>(other)) other = other.value;
|
|
1828
1855
|
return this.valueOf() < other.valueOf();
|
|
1829
1856
|
}
|
|
1830
1857
|
|
|
1831
1858
|
/** @returns a new Size representing the sum of the two Sizes. */
|
|
1832
1859
|
add(other: CrudeSize): Size {
|
|
1860
|
+
if (primitive.isCrudeValueExtension<number>(other)) other = other.value;
|
|
1833
1861
|
return new Size(math.add(this.valueOf(), other.valueOf()));
|
|
1834
1862
|
}
|
|
1835
1863
|
|
|
1836
1864
|
/** @returns a new Size representing the difference of the two Sizes. */
|
|
1837
1865
|
sub(other: CrudeSize): Size {
|
|
1866
|
+
if (primitive.isCrudeValueExtension<number>(other)) other = other.value;
|
|
1838
1867
|
return new Size(math.sub(this.valueOf(), other.valueOf()));
|
|
1839
1868
|
}
|
|
1840
1869
|
|
|
@@ -1860,12 +1889,14 @@ export class Size
|
|
|
1860
1889
|
|
|
1861
1890
|
/** @returns a new Size representing the truncated value of the Size. */
|
|
1862
1891
|
truncate(span: CrudeSize): Size {
|
|
1863
|
-
return new Size(
|
|
1892
|
+
return new Size(
|
|
1893
|
+
Math.trunc(this.valueOf() / new Size(span).valueOf()) * new Size(span).valueOf(),
|
|
1894
|
+
);
|
|
1864
1895
|
}
|
|
1865
1896
|
|
|
1866
1897
|
/** @returns a new Size representing the remainder of the Size. */
|
|
1867
1898
|
remainder(span: CrudeSize): Size {
|
|
1868
|
-
return Size.bytes(this.valueOf() % span.valueOf());
|
|
1899
|
+
return Size.bytes(this.valueOf() % new Size(span).valueOf());
|
|
1869
1900
|
}
|
|
1870
1901
|
|
|
1871
1902
|
/** @returns the number of gigabytes in the Size. */
|
|
@@ -1929,7 +1960,7 @@ export class Size
|
|
|
1929
1960
|
* @returns A Size representing the given number of kilobytes.
|
|
1930
1961
|
*/
|
|
1931
1962
|
static kilobytes(value: CrudeSize = 1): Size {
|
|
1932
|
-
return Size.bytes(value.valueOf() * 1e3);
|
|
1963
|
+
return Size.bytes(new Size(value).valueOf() * 1e3);
|
|
1933
1964
|
}
|
|
1934
1965
|
|
|
1935
1966
|
/** A kilobyte */
|
|
@@ -1942,7 +1973,7 @@ export class Size
|
|
|
1942
1973
|
* @returns A Size representing the given number of megabytes.
|
|
1943
1974
|
*/
|
|
1944
1975
|
static megabytes(value: CrudeSize = 1): Size {
|
|
1945
|
-
return Size.kilobytes(value.valueOf() * 1e3);
|
|
1976
|
+
return Size.kilobytes(new Size(value).valueOf() * 1e3);
|
|
1946
1977
|
}
|
|
1947
1978
|
|
|
1948
1979
|
/** A megabyte */
|
|
@@ -1955,7 +1986,7 @@ export class Size
|
|
|
1955
1986
|
* @returns A Size representing the given number of gigabytes.
|
|
1956
1987
|
*/
|
|
1957
1988
|
static gigabytes(value: CrudeSize = 1): Size {
|
|
1958
|
-
return Size.megabytes(value.valueOf() * 1e3);
|
|
1989
|
+
return Size.megabytes(new Size(value).valueOf() * 1e3);
|
|
1959
1990
|
}
|
|
1960
1991
|
|
|
1961
1992
|
/** A gigabyte */
|
|
@@ -1968,7 +1999,7 @@ export class Size
|
|
|
1968
1999
|
* @returns A Size representing the given number of terabytes.
|
|
1969
2000
|
*/
|
|
1970
2001
|
static terabytes(value: CrudeSize): Size {
|
|
1971
|
-
return Size.gigabytes(value.valueOf() * 1e3);
|
|
2002
|
+
return Size.gigabytes(new Size(value).valueOf() * 1e3);
|
|
1972
2003
|
}
|
|
1973
2004
|
|
|
1974
2005
|
/** A terabyte. */
|
|
@@ -1996,17 +2027,28 @@ export type CrudeTimeStamp =
|
|
|
1996
2027
|
| number
|
|
1997
2028
|
| Date
|
|
1998
2029
|
| string
|
|
1999
|
-
| DateComponents
|
|
2030
|
+
| DateComponents
|
|
2031
|
+
| primitive.CrudeValueExtension<bigint>;
|
|
2000
2032
|
export type TimeStampT = number;
|
|
2001
|
-
export type CrudeTimeSpan =
|
|
2033
|
+
export type CrudeTimeSpan =
|
|
2034
|
+
| bigint
|
|
2035
|
+
| TimeSpan
|
|
2036
|
+
| TimeStamp
|
|
2037
|
+
| number
|
|
2038
|
+
| Rate
|
|
2039
|
+
| primitive.CrudeValueExtension<bigint>;
|
|
2002
2040
|
export type TimeSpanT = number;
|
|
2003
|
-
export type CrudeRate = Rate | number
|
|
2041
|
+
export type CrudeRate = Rate | number | primitive.CrudeValueExtension<number>;
|
|
2004
2042
|
export type RateT = number;
|
|
2005
|
-
export type CrudeDensity = Density | number
|
|
2043
|
+
export type CrudeDensity = Density | number | primitive.CrudeValueExtension<number>;
|
|
2006
2044
|
export type DensityT = number;
|
|
2007
|
-
export type CrudeDataType =
|
|
2045
|
+
export type CrudeDataType =
|
|
2046
|
+
| DataType
|
|
2047
|
+
| string
|
|
2048
|
+
| TypedArray
|
|
2049
|
+
| primitive.CrudeValueExtension<string>;
|
|
2008
2050
|
export type DataTypeT = string;
|
|
2009
|
-
export type CrudeSize = Size | number
|
|
2051
|
+
export type CrudeSize = Size | number | primitive.CrudeValueExtension<number>;
|
|
2010
2052
|
export type SizeT = number;
|
|
2011
2053
|
export interface CrudeTimeRange {
|
|
2012
2054
|
start: CrudeTimeStamp;
|
package/src/undefined.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright 2025 Synnax Labs, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Use of this software is governed by the Business Source License included in the file
|
|
4
|
+
// licenses/BSL.txt.
|
|
5
|
+
//
|
|
6
|
+
// As of the Change Date specified in that file, in accordance with the Business Source
|
|
7
|
+
// License, use of this software will be governed by the Apache License, Version 2.0,
|
|
8
|
+
// included in the file licenses/APL.txt.
|
|
9
|
+
|
|
10
|
+
export type IsExactlyUndefined<T> = [T] extends [undefined] // T can be assigned to undefined
|
|
11
|
+
? [undefined] extends [T] // undefined can be assigned to T
|
|
12
|
+
? true // both directions → exactly undefined
|
|
13
|
+
: false
|
|
14
|
+
: false;
|