@synnaxlabs/x 0.42.3 → 0.44.0
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 +78 -78
- package/.vscode/settings.json +4 -6
- package/README.md +1 -7
- package/dist/array.cjs +1 -0
- package/dist/array.js +7 -0
- package/dist/binary.cjs +1 -1
- package/dist/binary.js +1 -1
- package/dist/bounds-D6e9xoHt.cjs +1 -0
- package/dist/bounds-Dj9nG39I.js +174 -0
- package/dist/bounds.cjs +1 -1
- package/dist/bounds.js +1 -1
- package/dist/{box-0YrQibkB.cjs → box-BcGdqkt4.cjs} +1 -1
- package/dist/{box-Cc8IzcNo.js → box-D_qdUyEe.js} +2 -2
- 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 +100 -88
- package/dist/{direction-C-b6XTeU.cjs → direction-386XDm2w.cjs} +1 -1
- package/dist/{direction-BL0PhD1k.js → direction-8etxfKaR.js} +4 -3
- package/dist/direction.cjs +1 -1
- package/dist/direction.js +1 -1
- package/dist/external-B9AAGv50.cjs +1 -0
- package/dist/external-BFgJjMcS.js +23 -0
- package/dist/{external-DqPrWKvU.js → external-BYuXBYJh.js} +10 -17
- package/dist/external-mffsMzJx.cjs +1 -0
- package/dist/index-B1m2qvBT.cjs +1 -0
- package/dist/index-B5l_quQn.js +92 -0
- package/dist/index-BQe8OIgm.cjs +3 -0
- package/dist/index-D2xcvEO5.js +46 -0
- package/dist/index-DdhM_E4k.cjs +1 -0
- package/dist/{index-QGplUHuy.js → index-PNh31WTW.js} +64 -37
- package/dist/index.cjs +3 -3
- package/dist/index.js +472 -428
- package/dist/kv.cjs +1 -1
- package/dist/kv.js +1 -1
- package/dist/{location-C3aeu046.js → location-Ar5y2DX2.js} +1 -1
- package/dist/{location-BGl5Ddds.cjs → location-DZi8ftXp.cjs} +1 -1
- package/dist/location.cjs +1 -1
- package/dist/location.js +1 -1
- package/dist/observe.cjs +1 -1
- package/dist/observe.js +16 -20
- package/dist/path-BXdMenka.js +101 -0
- package/dist/path-st_E5-LJ.cjs +1 -0
- package/dist/position-DAL0Qqdf.cjs +1 -0
- package/dist/position-bA6pUwLn.js +85 -0
- package/dist/position.cjs +1 -1
- package/dist/position.js +1 -1
- package/dist/record-CAcQ5PNX.js +14 -0
- package/dist/record-YvCh7bzB.cjs +1 -0
- package/dist/record.cjs +1 -1
- package/dist/record.js +2 -10
- package/dist/scale-Bzn1Cl0r.cjs +1 -0
- package/dist/{scale-DfJe9755.js → scale-CdTNWu-d.js} +55 -59
- package/dist/scale.cjs +1 -1
- package/dist/scale.js +1 -1
- package/dist/series-BeJyqCoP.js +2568 -0
- package/dist/series-anlpaR_I.cjs +6 -0
- package/dist/spatial.cjs +1 -1
- package/dist/spatial.js +6 -6
- package/dist/src/array/index.d.ts +2 -0
- package/dist/src/array/index.d.ts.map +1 -0
- package/dist/src/array/toArray.d.ts +19 -0
- package/dist/src/array/toArray.d.ts.map +1 -0
- package/dist/src/array/toArray.spec.d.ts +2 -0
- package/dist/src/array/toArray.spec.d.ts.map +1 -0
- package/dist/src/binary/codec.d.ts +7 -15
- package/dist/src/binary/codec.d.ts.map +1 -1
- package/dist/src/breaker/breaker.d.ts +5 -5
- package/dist/src/breaker/breaker.d.ts.map +1 -1
- package/dist/src/caseconv/caseconv.d.ts +0 -1
- package/dist/src/caseconv/caseconv.d.ts.map +1 -1
- package/dist/src/change/change.d.ts +2 -2
- package/dist/src/change/change.d.ts.map +1 -1
- package/dist/src/color/color.d.ts +60 -36
- package/dist/src/color/color.d.ts.map +1 -1
- package/dist/src/color/external.d.ts +0 -1
- package/dist/src/color/external.d.ts.map +1 -1
- package/dist/src/color/gradient.d.ts +6 -6
- package/dist/src/color/gradient.d.ts.map +1 -1
- package/dist/src/color/palette.d.ts +9 -9
- package/dist/src/color/palette.d.ts.map +1 -1
- package/dist/src/compare/compare.d.ts +8 -8
- package/dist/src/compare/compare.d.ts.map +1 -1
- package/dist/src/control/control.d.ts +39 -39
- package/dist/src/control/control.d.ts.map +1 -1
- package/dist/src/debounce/debounce.d.ts +1 -1
- package/dist/src/debounce/debounce.d.ts.map +1 -1
- package/dist/src/deep/delete.d.ts +1 -1
- package/dist/src/deep/delete.d.ts.map +1 -1
- package/dist/src/deep/difference.d.ts.map +1 -1
- package/dist/src/deep/equal.d.ts +4 -4
- package/dist/src/deep/equal.d.ts.map +1 -1
- package/dist/src/deep/merge.d.ts.map +1 -1
- package/dist/src/deep/path.d.ts +6 -6
- package/dist/src/deep/path.d.ts.map +1 -1
- package/dist/src/destructor.d.ts +6 -2
- package/dist/src/destructor.d.ts.map +1 -1
- package/dist/src/errors/errors.d.ts +65 -35
- package/dist/src/errors/errors.d.ts.map +1 -1
- package/dist/src/flush.d.ts +11 -0
- package/dist/src/flush.d.ts.map +1 -0
- package/dist/src/id/id.d.ts +1 -0
- package/dist/src/id/id.d.ts.map +1 -1
- package/dist/src/identity.d.ts +2 -2
- package/dist/src/identity.d.ts.map +1 -1
- package/dist/src/index.d.ts +7 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/instance/index.d.ts +2 -0
- package/dist/src/instance/index.d.ts.map +1 -0
- package/dist/src/instance/matcher.d.ts +79 -0
- package/dist/src/instance/matcher.d.ts.map +1 -0
- package/dist/src/instance/matcher.spec.d.ts +2 -0
- package/dist/src/instance/matcher.spec.d.ts.map +1 -0
- package/dist/src/jsonrpc/jsonrpc.d.ts +39 -8
- package/dist/src/jsonrpc/jsonrpc.d.ts.map +1 -1
- package/dist/src/kv/types.d.ts +1 -1
- package/dist/src/kv/types.d.ts.map +1 -1
- package/dist/src/map/index.d.ts +2 -0
- package/dist/src/map/index.d.ts.map +1 -0
- package/dist/src/map/map.d.ts +2 -0
- package/dist/src/map/map.d.ts.map +1 -0
- package/dist/src/map/map.spec.d.ts +2 -0
- package/dist/src/map/map.spec.d.ts.map +1 -0
- package/dist/src/math/math.d.ts +2 -4
- package/dist/src/math/math.d.ts.map +1 -1
- package/dist/src/migrate/migrate.d.ts +4 -4
- package/dist/src/migrate/migrate.d.ts.map +1 -1
- package/dist/src/optional.d.ts +0 -3
- package/dist/src/optional.d.ts.map +1 -1
- package/dist/src/primitive/index.d.ts +2 -0
- package/dist/src/primitive/index.d.ts.map +1 -0
- package/dist/src/primitive/primitive.d.ts +39 -0
- package/dist/src/primitive/primitive.d.ts.map +1 -0
- package/dist/src/primitive/primitive.spec.d.ts +2 -0
- package/dist/src/primitive/primitive.spec.d.ts.map +1 -0
- package/dist/src/record/index.d.ts +2 -0
- package/dist/src/record/index.d.ts.map +1 -0
- package/dist/src/record/record.d.ts +90 -0
- package/dist/src/record/record.d.ts.map +1 -0
- package/dist/src/record/record.spec.d.ts.map +1 -0
- package/dist/src/renderable.d.ts +1 -1
- package/dist/src/renderable.d.ts.map +1 -1
- package/dist/src/replace.d.ts.map +1 -1
- package/dist/src/runtime/detect.d.ts.map +1 -1
- package/dist/src/spatial/base.d.ts +9 -9
- package/dist/src/spatial/base.d.ts.map +1 -1
- package/dist/src/spatial/bounds/bounds.d.ts +82 -16
- package/dist/src/spatial/bounds/bounds.d.ts.map +1 -1
- package/dist/src/spatial/box/box.d.ts +6 -6
- package/dist/src/spatial/box/box.d.ts.map +1 -1
- package/dist/src/spatial/dimensions/dimensions.d.ts +4 -4
- package/dist/src/spatial/dimensions/dimensions.d.ts.map +1 -1
- package/dist/src/spatial/direction/direction.d.ts +2 -2
- package/dist/src/spatial/direction/direction.d.ts.map +1 -1
- package/dist/src/spatial/location/location.d.ts +3 -3
- package/dist/src/spatial/location/location.d.ts.map +1 -1
- package/dist/src/spatial/scale/scale.d.ts +10 -10
- package/dist/src/spatial/scale/scale.d.ts.map +1 -1
- package/dist/src/spatial/xy/xy.d.ts +4 -4
- package/dist/src/spatial/xy/xy.d.ts.map +1 -1
- package/dist/src/status/index.d.ts +2 -0
- package/dist/src/status/index.d.ts.map +1 -0
- package/dist/src/status/status.d.ts +42 -0
- package/dist/src/status/status.d.ts.map +1 -0
- package/dist/src/status/status.spec.d.ts +2 -0
- package/dist/src/status/status.spec.d.ts.map +1 -0
- package/dist/src/strings/strings.d.ts +16 -0
- package/dist/src/strings/strings.d.ts.map +1 -1
- package/dist/src/sync/index.d.ts.map +1 -1
- package/dist/src/sync/mutex.d.ts +0 -1
- package/dist/src/sync/mutex.d.ts.map +1 -1
- package/dist/src/telem/series.d.ts +473 -66
- package/dist/src/telem/series.d.ts.map +1 -1
- package/dist/src/telem/telem.d.ts +274 -61
- package/dist/src/telem/telem.d.ts.map +1 -1
- package/dist/src/testutil/testutil.d.ts +1 -0
- package/dist/src/testutil/testutil.d.ts.map +1 -1
- package/dist/src/testutil/testutil.spec.d.ts +2 -0
- package/dist/src/testutil/testutil.spec.d.ts.map +1 -0
- package/dist/src/uuid/index.d.ts +2 -0
- package/dist/src/uuid/index.d.ts.map +1 -0
- package/dist/src/uuid/uuid.d.ts +35 -0
- package/dist/src/uuid/uuid.d.ts.map +1 -0
- package/dist/src/uuid/uuid.spec.d.ts +2 -0
- package/dist/src/uuid/uuid.spec.d.ts.map +1 -0
- package/dist/src/zod/external.d.ts +2 -1
- package/dist/src/zod/external.d.ts.map +1 -1
- package/dist/src/zod/nullToUndefined.d.ts +3 -0
- package/dist/src/zod/nullToUndefined.d.ts.map +1 -0
- package/dist/src/zod/nullToUndefined.spec.d.ts +2 -0
- package/dist/src/zod/nullToUndefined.spec.d.ts.map +1 -0
- package/dist/src/zod/toArray.d.ts +3 -0
- package/dist/src/zod/toArray.d.ts.map +1 -0
- package/dist/src/zod/toArray.spec.d.ts +2 -0
- package/dist/src/zod/toArray.spec.d.ts.map +1 -0
- package/dist/src/zod/util.d.ts +1 -1
- package/dist/src/zod/util.d.ts.map +1 -1
- package/dist/telem.cjs +1 -1
- package/dist/telem.js +10 -11
- package/dist/url.cjs +1 -1
- package/dist/url.js +16 -19
- package/dist/worker.cjs +1 -1
- package/dist/worker.js +18 -22
- package/dist/zod.cjs +1 -1
- package/dist/zod.js +1 -1
- package/eslint.config.js +1 -1
- package/package.json +20 -23
- package/src/array/index.ts +10 -0
- package/src/array/toArray.spec.ts +56 -0
- package/src/array/toArray.ts +28 -0
- package/src/binary/codec.spec.ts +200 -277
- package/src/binary/codec.ts +19 -75
- package/src/breaker/breaker.ts +2 -2
- package/src/caseconv/caseconv.ts +14 -14
- package/src/change/change.ts +1 -1
- package/src/color/color.spec.ts +113 -2
- package/src/color/color.ts +88 -58
- package/src/color/external.ts +0 -1
- package/src/color/gradient.ts +19 -27
- package/src/compare/compare.ts +10 -10
- package/src/control/control.ts +22 -19
- package/src/debounce/debounce.ts +1 -1
- package/src/deep/delete.ts +5 -4
- package/src/deep/difference.ts +6 -2
- package/src/deep/equal.spec.ts +1 -1
- package/src/deep/equal.ts +5 -5
- package/src/deep/merge.spec.ts +1 -2
- package/src/deep/merge.ts +15 -6
- package/src/deep/path.spec.ts +41 -0
- package/src/deep/path.ts +48 -17
- package/src/destructor.ts +6 -2
- package/src/errors/errors.spec.ts +20 -20
- package/src/errors/errors.ts +67 -43
- package/src/flush.ts +21 -0
- package/src/id/id.spec.ts +1 -1
- package/src/id/id.ts +3 -1
- package/src/identity.ts +2 -2
- package/src/index.ts +7 -2
- package/src/instance/index.ts +10 -0
- package/src/instance/matcher.spec.ts +78 -0
- package/src/instance/matcher.ts +98 -0
- package/src/jsonrpc/jsonrpc.spec.ts +2 -1
- package/src/jsonrpc/jsonrpc.ts +35 -6
- package/src/map/index.ts +10 -0
- package/src/map/map.spec.ts +132 -0
- package/src/map/map.ts +17 -0
- package/src/math/math.ts +19 -27
- package/src/migrate/migrate.spec.ts +1 -1
- package/src/migrate/migrate.ts +7 -7
- package/src/optional.ts +0 -4
- package/src/primitive/index.ts +10 -0
- package/src/primitive/primitive.spec.ts +126 -0
- package/src/primitive/primitive.ts +82 -0
- package/src/record/index.ts +10 -0
- package/src/record/record.spec.ts +319 -0
- package/src/record/record.ts +118 -0
- package/src/renderable.ts +1 -1
- package/src/replace.ts +9 -0
- package/src/runtime/detect.ts +0 -2
- package/src/spatial/bounds/bounds.spec.ts +20 -0
- package/src/spatial/bounds/bounds.ts +101 -18
- package/src/spatial/dimensions/dimensions.ts +2 -2
- package/src/spatial/direction/direction.ts +1 -1
- package/src/status/index.ts +10 -0
- package/src/status/status.spec.ts +25 -0
- package/src/status/status.ts +91 -0
- package/src/strings/strings.spec.ts +51 -13
- package/src/strings/strings.ts +20 -0
- package/src/sync/index.ts +9 -0
- package/src/sync/mutex.ts +9 -4
- package/src/telem/series.spec.ts +912 -105
- package/src/telem/series.ts +577 -201
- package/src/telem/telem.spec.ts +262 -90
- package/src/telem/telem.ts +335 -125
- package/src/testutil/testutil.spec.ts +161 -0
- package/src/testutil/testutil.ts +12 -0
- package/src/uuid/index.ts +10 -0
- package/src/uuid/uuid.spec.ts +82 -0
- package/src/uuid/uuid.ts +48 -0
- package/src/zod/external.ts +2 -1
- package/src/zod/nullToUndefined.spec.ts +31 -0
- package/src/zod/nullToUndefined.ts +23 -0
- package/src/zod/toArray.spec.ts +182 -0
- package/src/{toArray.ts → zod/toArray.ts} +3 -4
- package/src/zod/util.spec.ts +1 -1
- package/src/zod/util.ts +7 -7
- package/tsconfig.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/vite.config.ts +2 -3
- package/dist/bounds-BQo7rvs9.cjs +0 -1
- package/dist/bounds-Bn5_l4Z3.js +0 -173
- package/dist/external-C-dNgNQw.cjs +0 -1
- package/dist/external-C8TFju8Q.js +0 -29
- package/dist/external-DWQITF5_.cjs +0 -1
- package/dist/index-BywOGO8U.js +0 -1074
- package/dist/index-CYYjI7Uf.cjs +0 -1
- package/dist/index-C_6NXBlg.cjs +0 -3
- package/dist/index-Dd8DLyMx.cjs +0 -1
- package/dist/index-DizUWH6z.js +0 -47
- package/dist/path-1tZLZ4AN.cjs +0 -1
- package/dist/path-DD6ytXzr.js +0 -76
- package/dist/position-Cai5-wi1.cjs +0 -1
- package/dist/position-DIglP1l2.js +0 -85
- package/dist/scale-BtZINJ-A.cjs +0 -1
- package/dist/search.cjs +0 -1
- package/dist/search.js +0 -14
- package/dist/series-B9JERcqi.js +0 -1977
- package/dist/series-DqJ6f97G.cjs +0 -11
- package/dist/src/color/transformColorsToHex.d.ts +0 -6
- package/dist/src/color/transformColorsToHex.d.ts.map +0 -1
- package/dist/src/primitive.d.ts +0 -9
- package/dist/src/primitive.d.ts.map +0 -1
- package/dist/src/record.d.ts +0 -18
- package/dist/src/record.d.ts.map +0 -1
- package/dist/src/record.spec.d.ts.map +0 -1
- package/dist/src/search.d.ts +0 -18
- package/dist/src/search.d.ts.map +0 -1
- package/dist/src/toArray.d.ts +0 -3
- package/dist/src/toArray.d.ts.map +0 -1
- package/dist/src/zod/integer.d.ts +0 -10
- package/dist/src/zod/integer.d.ts.map +0 -1
- package/dist/src/zod/integer.spec.d.ts +0 -2
- package/dist/src/zod/integer.spec.d.ts.map +0 -1
- package/dist/toArray.cjs +0 -1
- package/dist/toArray.js +0 -5
- package/src/color/transformColorsToHex.ts +0 -30
- package/src/primitive.ts +0 -46
- package/src/record.spec.ts +0 -38
- package/src/record.ts +0 -47
- package/src/search.ts +0 -42
- package/src/zod/integer.spec.ts +0 -148
- package/src/zod/integer.ts +0 -38
- /package/dist/src/{record.spec.d.ts → record/record.spec.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"series.d.ts","sourceRoot":"","sources":["../../../src/telem/series.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAEnB,MAAM,YAA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M,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { math } from '../math';
|
|
3
|
-
import {
|
|
3
|
+
import { primitive } from '../primitive';
|
|
4
4
|
import { bounds } from '../spatial';
|
|
5
|
+
/** Time zone specification when working with time stamps. */
|
|
5
6
|
export type TZInfo = "UTC" | "local";
|
|
7
|
+
/** Different string formats for time stamps. */
|
|
6
8
|
export type TimeStampStringFormat = "ISO" | "ISODate" | "ISOTime" | "time" | "preciseTime" | "date" | "preciseDate" | "shortDate" | "dateTime";
|
|
7
|
-
|
|
9
|
+
declare const dateComponentsZ: z.ZodUnion<readonly [z.ZodTuple<[z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt, z.ZodInt], null>]>;
|
|
8
10
|
/**
|
|
9
|
-
*
|
|
11
|
+
* A triple of numbers representing a date.
|
|
12
|
+
*
|
|
13
|
+
* @param year - The year.
|
|
14
|
+
* @param month - The month.
|
|
15
|
+
* @param day - The day.
|
|
16
|
+
*/
|
|
17
|
+
export type DateComponents = z.infer<typeof dateComponentsZ>;
|
|
18
|
+
/**
|
|
19
|
+
UTC timestamp. Synnax uses a nanosecond precision int64 timestamp.
|
|
10
20
|
*
|
|
11
21
|
* @param value - The timestamp value to parse. This can be any of the following:
|
|
12
22
|
*
|
|
@@ -26,20 +36,28 @@ export type DateComponents = [number?, number?, number?];
|
|
|
26
36
|
* @example ts = new TimeStamp([2021, 1, 1]).add(1 * TimeSpan.HOUR) // 1/1/2021 at 1am UTC
|
|
27
37
|
* @example ts = new TimeStamp("2021-01-01T12:30:00Z") // 1/1/2021 at 12:30pm UTC
|
|
28
38
|
*/
|
|
29
|
-
export declare class TimeStamp implements Stringer {
|
|
30
|
-
/** The underlying value for the time stamp */
|
|
31
|
-
private readonly value;
|
|
32
|
-
/** Makes sure JSON encodes the value and not the class. */
|
|
33
|
-
readonly encodeValue = true;
|
|
39
|
+
export declare class TimeStamp extends primitive.ValueExtension<bigint> implements primitive.Stringer {
|
|
34
40
|
constructor(value?: CrudeTimeStamp, tzInfo?: TZInfo);
|
|
35
41
|
private static parseDate;
|
|
42
|
+
/**
|
|
43
|
+
* @returns the primitive value of the TimeStamp. Overrides standard JS valueOf()
|
|
44
|
+
* method.
|
|
45
|
+
*/
|
|
36
46
|
valueOf(): bigint;
|
|
37
47
|
private static parseTimeString;
|
|
38
48
|
private static parseDateTimeString;
|
|
49
|
+
/**
|
|
50
|
+
* Formats the TimeStamp as a string in the specified format.
|
|
51
|
+
*
|
|
52
|
+
* @param format - The format to use for the string representation.
|
|
53
|
+
* @param tzInfo - The timezone to use when creating the string representation.
|
|
54
|
+
* @returns A string representation of the TimeStamp in the specified format.
|
|
55
|
+
*/
|
|
39
56
|
fString(format?: TimeStampStringFormat, tzInfo?: TZInfo): string;
|
|
40
57
|
private toISOString;
|
|
41
58
|
private timeString;
|
|
42
59
|
private dateString;
|
|
60
|
+
/** @returns The UTC offset for the time zone of the machine. */
|
|
43
61
|
static get utcOffset(): TimeSpan;
|
|
44
62
|
/**
|
|
45
63
|
* @returns a TimeSpan representing the amount time elapsed since
|
|
@@ -157,7 +175,7 @@ export declare class TimeStamp implements Stringer {
|
|
|
157
175
|
get seconds(): number;
|
|
158
176
|
/** @returns the floating point number of milliseconds since the unix epoch. */
|
|
159
177
|
get milliseconds(): number;
|
|
160
|
-
/** @returns the floating point number of microseconds since the unix epoch */
|
|
178
|
+
/** @returns the floating point number of microseconds since the unix epoch. */
|
|
161
179
|
get microseconds(): number;
|
|
162
180
|
/**
|
|
163
181
|
* @returns the floating point number of nanoseconds since the unix epoch.
|
|
@@ -238,6 +256,12 @@ export declare class TimeStamp implements Stringer {
|
|
|
238
256
|
remainder(divisor: TimeSpan | TimeStamp): TimeStamp;
|
|
239
257
|
/** @returns true if the day portion TimeStamp is today, false otherwise. */
|
|
240
258
|
get isToday(): boolean;
|
|
259
|
+
/**
|
|
260
|
+
* Truncates the TimeStamp to the nearest multiple of the given span.
|
|
261
|
+
*
|
|
262
|
+
* @param span - The TimeSpan to truncate to.
|
|
263
|
+
* @returns A new TimeStamp that is truncated to the nearest multiple of the given span.
|
|
264
|
+
*/
|
|
241
265
|
truncate(span: TimeSpan | TimeStamp): TimeStamp;
|
|
242
266
|
/**
|
|
243
267
|
* @returns A new TimeStamp representing the current time in UTC. It's important to
|
|
@@ -245,11 +269,26 @@ export declare class TimeStamp implements Stringer {
|
|
|
245
269
|
* JavaScript can do).
|
|
246
270
|
*/
|
|
247
271
|
static now(): TimeStamp;
|
|
248
|
-
/**
|
|
272
|
+
/**
|
|
273
|
+
* Finds the maximum timestamp among the provided timestamps.
|
|
274
|
+
*
|
|
275
|
+
* @param timestamps - The timestamps to compare.
|
|
276
|
+
* @returns The maximum (latest) timestamp from the input.
|
|
277
|
+
*/
|
|
249
278
|
static max(...timestamps: CrudeTimeStamp[]): TimeStamp;
|
|
250
|
-
/**
|
|
279
|
+
/**
|
|
280
|
+
* Finds the minimum timestamp among the provided timestamps.
|
|
281
|
+
*
|
|
282
|
+
* @param timestamps - The timestamps to compare.
|
|
283
|
+
* @returns The minimum (earliest) timestamp from the input.
|
|
284
|
+
*/
|
|
251
285
|
static min(...timestamps: CrudeTimeStamp[]): TimeStamp;
|
|
252
|
-
/**
|
|
286
|
+
/**
|
|
287
|
+
* Creates a TimeStamp representing the given number of nanoseconds.
|
|
288
|
+
*
|
|
289
|
+
* @param value - The number of nanoseconds.
|
|
290
|
+
* @returns A TimeStamp representing the given number of nanoseconds.
|
|
291
|
+
*/
|
|
253
292
|
static nanoseconds(value: number, tzInfo?: TZInfo): TimeStamp;
|
|
254
293
|
/** One nanosecond after the unix epoch */
|
|
255
294
|
static readonly NANOSECOND: TimeStamp;
|
|
@@ -284,40 +323,111 @@ export declare class TimeStamp implements Stringer {
|
|
|
284
323
|
/** The unix epoch */
|
|
285
324
|
static readonly ZERO: TimeStamp;
|
|
286
325
|
/** A zod schema for validating timestamps */
|
|
287
|
-
static readonly z: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
326
|
+
static readonly z: z.ZodUnion<readonly [z.ZodCustom<TimeStamp, TimeStamp>, z.ZodPipe<z.ZodObject<{
|
|
288
327
|
value: z.ZodBigInt;
|
|
289
|
-
},
|
|
328
|
+
}, z.core.$strip>, z.ZodTransform<TimeStamp, {
|
|
290
329
|
value: bigint;
|
|
291
|
-
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeStamp, string>>, z.ZodPipe<z.
|
|
330
|
+
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeStamp, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<TimeStamp, number>>, z.ZodPipe<z.ZodBigInt, z.ZodTransform<TimeStamp, bigint>>, z.ZodPipe<z.ZodDate, z.ZodTransform<TimeStamp, Date>>, z.ZodPipe<z.ZodCustom<TimeSpan, TimeSpan>, z.ZodTransform<TimeStamp, TimeSpan>>, z.ZodPipe<z.ZodUnion<readonly [z.ZodTuple<[z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt, z.ZodInt], null>]>, z.ZodTransform<TimeStamp, [number] | [number, number] | [number, number, number]>>]>;
|
|
331
|
+
/**
|
|
332
|
+
* Sorts two timestamps.
|
|
333
|
+
*
|
|
334
|
+
* @param a - The first timestamp.
|
|
335
|
+
* @param b - The second timestamp.
|
|
336
|
+
* @returns A number indicating the order of the two timestamps (positive if a is
|
|
337
|
+
* greater than b, negative if a is less than b, and 0 if they are equal).
|
|
338
|
+
*/
|
|
339
|
+
static sort(a: TimeStamp, b: TimeStamp): number;
|
|
292
340
|
}
|
|
293
341
|
/** TimeSpan represents a nanosecond precision duration. */
|
|
294
|
-
export declare class TimeSpan implements Stringer {
|
|
295
|
-
private readonly value;
|
|
296
|
-
readonly encodeValue = true;
|
|
342
|
+
export declare class TimeSpan extends primitive.ValueExtension<bigint> implements primitive.Stringer {
|
|
297
343
|
constructor(value: CrudeTimeSpan);
|
|
344
|
+
/**
|
|
345
|
+
* Creates a TimeSpan representing the given number of seconds.
|
|
346
|
+
*
|
|
347
|
+
* @param span - The number of seconds.
|
|
348
|
+
* @returns A TimeSpan representing the given number of seconds.
|
|
349
|
+
*/
|
|
298
350
|
static fromSeconds(span: CrudeTimeSpan): TimeSpan;
|
|
351
|
+
/**
|
|
352
|
+
* Creates a TimeSpan representing the given number of milliseconds.
|
|
353
|
+
*
|
|
354
|
+
* @param span - The number of milliseconds.
|
|
355
|
+
* @returns A TimeSpan representing the given number of milliseconds.
|
|
356
|
+
*/
|
|
299
357
|
static fromMilliseconds(span: CrudeTimeSpan): TimeSpan;
|
|
300
|
-
|
|
358
|
+
/**
|
|
359
|
+
* @returns the primitive value of the TimeSpan. Overrides standard JS valueOf()
|
|
360
|
+
* method.
|
|
361
|
+
*/
|
|
301
362
|
valueOf(): bigint;
|
|
363
|
+
/**
|
|
364
|
+
* Checks if the TimeSpan is less than another TimeSpan.
|
|
365
|
+
*
|
|
366
|
+
* @param other - The TimeSpan to compare against.
|
|
367
|
+
* @returns True if the TimeSpan is less than the other TimeSpan, false otherwise.
|
|
368
|
+
*/
|
|
302
369
|
lessThan(other: CrudeTimeSpan): boolean;
|
|
370
|
+
/**
|
|
371
|
+
* Checks if the TimeSpan is greater than another TimeSpan.
|
|
372
|
+
*
|
|
373
|
+
* @param other - The TimeSpan to compare against.
|
|
374
|
+
* @returns True if the TimeSpan is greater than the other TimeSpan, false otherwise.
|
|
375
|
+
*/
|
|
303
376
|
greaterThan(other: CrudeTimeSpan): boolean;
|
|
377
|
+
/**
|
|
378
|
+
* Checks if the TimeSpan is less than or equal to another TimeSpan.
|
|
379
|
+
*
|
|
380
|
+
* @param other - The TimeSpan to compare against.
|
|
381
|
+
* @returns True if the TimeSpan is less than or equal to the other TimeSpan, false otherwise.
|
|
382
|
+
*/
|
|
304
383
|
lessThanOrEqual(other: CrudeTimeSpan): boolean;
|
|
384
|
+
/**
|
|
385
|
+
* Checks if the TimeSpan is greater than or equal to another TimeSpan.
|
|
386
|
+
*
|
|
387
|
+
* @param other - The TimeSpan to compare against.
|
|
388
|
+
* @returns True if the TimeSpan is greater than or equal to the other TimeSpan, false otherwise.
|
|
389
|
+
*/
|
|
305
390
|
greaterThanOrEqual(other: CrudeTimeSpan): boolean;
|
|
391
|
+
/**
|
|
392
|
+
* Calculates the remainder of the TimeSpan when divided by another TimeSpan.
|
|
393
|
+
*
|
|
394
|
+
* @param divisor - The TimeSpan to divide by.
|
|
395
|
+
* @returns A new TimeSpan representing the remainder.
|
|
396
|
+
*/
|
|
306
397
|
remainder(divisor: TimeSpan): TimeSpan;
|
|
398
|
+
/**
|
|
399
|
+
* Truncates the TimeSpan to the nearest multiple of the given span.
|
|
400
|
+
*
|
|
401
|
+
* @param span - The TimeSpan to truncate to.
|
|
402
|
+
* @returns A new TimeSpan that is truncated to the nearest multiple of the given span.
|
|
403
|
+
*/
|
|
307
404
|
truncate(span: TimeSpan): TimeSpan;
|
|
405
|
+
/**
|
|
406
|
+
* Returns a string representation of the TimeSpan.
|
|
407
|
+
*
|
|
408
|
+
* @returns A string representation of the TimeSpan.
|
|
409
|
+
*/
|
|
308
410
|
toString(): string;
|
|
411
|
+
/**
|
|
412
|
+
* Multiplies the TimeSpan by a scalar value.
|
|
413
|
+
*
|
|
414
|
+
* @param value - The scalar value to multiply by.
|
|
415
|
+
* @returns A new TimeSpan that is this TimeSpan multiplied by the provided value.
|
|
416
|
+
*/
|
|
309
417
|
mult(value: number): TimeSpan;
|
|
310
|
-
/** @returns the decimal number of days in the
|
|
418
|
+
/** @returns the decimal number of days in the TimeSpan. */
|
|
311
419
|
get days(): number;
|
|
312
|
-
/** @returns the decimal number of hours in the
|
|
420
|
+
/** @returns the decimal number of hours in the TimeSpan. */
|
|
313
421
|
get hours(): number;
|
|
314
|
-
/** @returns the decimal number of minutes in the
|
|
422
|
+
/** @returns the decimal number of minutes in the TimeSpan. */
|
|
315
423
|
get minutes(): number;
|
|
316
424
|
/** @returns The number of seconds in the TimeSpan. */
|
|
317
425
|
get seconds(): number;
|
|
318
426
|
/** @returns The number of milliseconds in the TimeSpan. */
|
|
319
427
|
get milliseconds(): number;
|
|
428
|
+
/** @returns The number of microseconds in the TimeSpan. */
|
|
320
429
|
get microseconds(): number;
|
|
430
|
+
/** @returns The number of nanoseconds in the TimeSpan. */
|
|
321
431
|
get nanoseconds(): number;
|
|
322
432
|
/**
|
|
323
433
|
* Checks if the TimeSpan represents a zero duration.
|
|
@@ -415,12 +525,12 @@ export declare class TimeSpan implements Stringer {
|
|
|
415
525
|
/** A zod schema for validating and transforming timespans */
|
|
416
526
|
static readonly z: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
417
527
|
value: z.ZodBigInt;
|
|
418
|
-
},
|
|
528
|
+
}, z.core.$strip>, z.ZodTransform<TimeSpan, {
|
|
419
529
|
value: bigint;
|
|
420
|
-
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeSpan, string>>, z.ZodPipe<z.
|
|
530
|
+
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeSpan, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<TimeSpan, number>>, z.ZodCustom<TimeSpan, TimeSpan>]>;
|
|
421
531
|
}
|
|
422
532
|
/** Rate represents a data rate in Hz. */
|
|
423
|
-
export declare class Rate extends
|
|
533
|
+
export declare class Rate extends primitive.ValueExtension<number> implements primitive.Stringer {
|
|
424
534
|
constructor(value: CrudeRate);
|
|
425
535
|
/** @returns a pretty string representation of the rate in the format "X Hz". */
|
|
426
536
|
toString(): string;
|
|
@@ -477,10 +587,10 @@ export declare class Rate extends Number implements Stringer {
|
|
|
477
587
|
*/
|
|
478
588
|
static khz(value: number): Rate;
|
|
479
589
|
/** A zod schema for validating and transforming rates */
|
|
480
|
-
static readonly z: z.ZodUnion<readonly [z.ZodPipe<z.ZodNumber, z.ZodTransform<Rate, number>>, z.
|
|
590
|
+
static readonly z: z.ZodUnion<readonly [z.ZodPipe<z.ZodNumber, z.ZodTransform<Rate, number>>, z.ZodCustom<Rate, Rate>]>;
|
|
481
591
|
}
|
|
482
592
|
/** Density represents the number of bytes in a value. */
|
|
483
|
-
export declare class Density extends
|
|
593
|
+
export declare class Density extends primitive.ValueExtension<number> implements primitive.Stringer {
|
|
484
594
|
/**
|
|
485
595
|
* Creates a Density representing the given number of bytes per value.
|
|
486
596
|
*
|
|
@@ -489,7 +599,19 @@ export declare class Density extends Number implements Stringer {
|
|
|
489
599
|
* @returns A Density representing the given number of bytes per value.
|
|
490
600
|
*/
|
|
491
601
|
constructor(value: CrudeDensity);
|
|
602
|
+
/**
|
|
603
|
+
* Calculates the number of values in the given Size.
|
|
604
|
+
*
|
|
605
|
+
* @param size - The Size to calculate the value count from.
|
|
606
|
+
* @returns The number of values in the given Size.
|
|
607
|
+
*/
|
|
492
608
|
length(size: Size): number;
|
|
609
|
+
/**
|
|
610
|
+
* Calculates a Size representing the given number of values.
|
|
611
|
+
*
|
|
612
|
+
* @param sampleCount - The number of values in the Size.
|
|
613
|
+
* @returns A Size representing the given number of values.
|
|
614
|
+
*/
|
|
493
615
|
size(sampleCount: number): Size;
|
|
494
616
|
/** Unknown/Invalid Density. */
|
|
495
617
|
static readonly UNKNOWN: Density;
|
|
@@ -504,7 +626,7 @@ export declare class Density extends Number implements Stringer {
|
|
|
504
626
|
/** 8 bits per value. */
|
|
505
627
|
static readonly BIT8: Density;
|
|
506
628
|
/** A zod schema for validating and transforming densities */
|
|
507
|
-
static readonly z: z.ZodUnion<readonly [z.ZodPipe<z.ZodNumber, z.ZodTransform<Density, number>>, z.
|
|
629
|
+
static readonly z: z.ZodUnion<readonly [z.ZodPipe<z.ZodNumber, z.ZodTransform<Density, number>>, z.ZodCustom<Density, Density>]>;
|
|
508
630
|
}
|
|
509
631
|
/**
|
|
510
632
|
* TimeRange is a range of time marked by a start and end timestamp. A TimeRange
|
|
@@ -513,7 +635,7 @@ export declare class Density extends Number implements Stringer {
|
|
|
513
635
|
* @property start - A TimeStamp representing the start of the range.
|
|
514
636
|
* @property end - A Timestamp representing the end of the range.
|
|
515
637
|
*/
|
|
516
|
-
export declare class TimeRange implements Stringer {
|
|
638
|
+
export declare class TimeRange implements primitive.Stringer {
|
|
517
639
|
/**
|
|
518
640
|
* The starting TimeStamp of the TimeRange.
|
|
519
641
|
*
|
|
@@ -572,7 +694,17 @@ export declare class TimeRange implements Stringer {
|
|
|
572
694
|
* @returns True if the TimeRange is equal to the given TimeRange.
|
|
573
695
|
*/
|
|
574
696
|
equals(other: TimeRange, delta?: TimeSpan): boolean;
|
|
697
|
+
/**
|
|
698
|
+
* Returns a string representation of the TimeRange.
|
|
699
|
+
*
|
|
700
|
+
* @returns A string representation of the TimeRange.
|
|
701
|
+
*/
|
|
575
702
|
toString(): string;
|
|
703
|
+
/**
|
|
704
|
+
* Returns a pretty string representation of the TimeRange.
|
|
705
|
+
*
|
|
706
|
+
* @returns A pretty string representation of the TimeRange.
|
|
707
|
+
*/
|
|
576
708
|
toPrettyString(): string;
|
|
577
709
|
/**
|
|
578
710
|
* Checks if the two time ranges overlap. If the two time ranges are equal, returns
|
|
@@ -586,8 +718,31 @@ export declare class TimeRange implements Stringer {
|
|
|
586
718
|
* @returns True if the two TimeRanges overlap, false otherwise.
|
|
587
719
|
*/
|
|
588
720
|
overlapsWith(other: TimeRange, delta?: TimeSpan): boolean;
|
|
721
|
+
/**
|
|
722
|
+
* Checks if the TimeRange contains the given TimeRange or TimeStamp.
|
|
723
|
+
*
|
|
724
|
+
* @param other - The TimeRange or TimeStamp to check if it is contained in the TimeRange.
|
|
725
|
+
* @returns True if the TimeRange contains the given TimeRange or TimeStamp.
|
|
726
|
+
*/
|
|
589
727
|
contains(other: TimeRange): boolean;
|
|
728
|
+
/**
|
|
729
|
+
* Checks if the TimeRange contains the given TimeStamp.
|
|
730
|
+
*
|
|
731
|
+
* @param ts - The TimeStamp to check if it is contained in the TimeRange.
|
|
732
|
+
* @returns True if the TimeRange contains the given TimeStamp.
|
|
733
|
+
*/
|
|
590
734
|
contains(ts: CrudeTimeStamp): boolean;
|
|
735
|
+
/**
|
|
736
|
+
* Returns a new TimeRange that is bound by the given TimeRange.
|
|
737
|
+
*
|
|
738
|
+
* @param other - The TimeRange to bound by.
|
|
739
|
+
* @returns A new TimeRange that is bound by the given TimeRange.
|
|
740
|
+
* @example
|
|
741
|
+
* const range = new TimeRange(new TimeStamp(1000), new TimeStamp(2000));
|
|
742
|
+
* const other = new TimeRange(new TimeStamp(1500), new TimeStamp(2500));
|
|
743
|
+
* const bounded = range.boundBy(other);
|
|
744
|
+
* console.log(bounded); // TimeRange(1500, 2000)
|
|
745
|
+
*/
|
|
591
746
|
boundBy(other: TimeRange): TimeRange;
|
|
592
747
|
static max(...others: TimeRange[]): TimeRange;
|
|
593
748
|
/** The maximum possible time range. */
|
|
@@ -598,27 +753,35 @@ export declare class TimeRange implements Stringer {
|
|
|
598
753
|
static readonly ZERO: TimeRange;
|
|
599
754
|
/** A zod schema for validating and transforming time ranges */
|
|
600
755
|
static readonly z: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
601
|
-
start: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
756
|
+
start: z.ZodUnion<readonly [z.ZodCustom<TimeStamp, TimeStamp>, z.ZodPipe<z.ZodObject<{
|
|
602
757
|
value: z.ZodBigInt;
|
|
603
|
-
},
|
|
758
|
+
}, z.core.$strip>, z.ZodTransform<TimeStamp, {
|
|
604
759
|
value: bigint;
|
|
605
|
-
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeStamp, string>>, z.ZodPipe<z.
|
|
606
|
-
end: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
760
|
+
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeStamp, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<TimeStamp, number>>, z.ZodPipe<z.ZodBigInt, z.ZodTransform<TimeStamp, bigint>>, z.ZodPipe<z.ZodDate, z.ZodTransform<TimeStamp, Date>>, z.ZodPipe<z.ZodCustom<TimeSpan, TimeSpan>, z.ZodTransform<TimeStamp, TimeSpan>>, z.ZodPipe<z.ZodUnion<readonly [z.ZodTuple<[z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt, z.ZodInt], null>]>, z.ZodTransform<TimeStamp, [number] | [number, number] | [number, number, number]>>]>;
|
|
761
|
+
end: z.ZodUnion<readonly [z.ZodCustom<TimeStamp, TimeStamp>, z.ZodPipe<z.ZodObject<{
|
|
607
762
|
value: z.ZodBigInt;
|
|
608
|
-
},
|
|
763
|
+
}, z.core.$strip>, z.ZodTransform<TimeStamp, {
|
|
609
764
|
value: bigint;
|
|
610
|
-
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeStamp, string>>, z.ZodPipe<z.
|
|
611
|
-
},
|
|
765
|
+
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeStamp, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<TimeStamp, number>>, z.ZodPipe<z.ZodBigInt, z.ZodTransform<TimeStamp, bigint>>, z.ZodPipe<z.ZodDate, z.ZodTransform<TimeStamp, Date>>, z.ZodPipe<z.ZodCustom<TimeSpan, TimeSpan>, z.ZodTransform<TimeStamp, TimeSpan>>, z.ZodPipe<z.ZodUnion<readonly [z.ZodTuple<[z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt, z.ZodInt], null>]>, z.ZodTransform<TimeStamp, [number] | [number, number] | [number, number, number]>>]>;
|
|
766
|
+
}, z.core.$strip>, z.ZodTransform<TimeRange, {
|
|
612
767
|
start: TimeStamp;
|
|
613
768
|
end: TimeStamp;
|
|
614
|
-
}>>, z.ZodCustom<TimeRange,
|
|
769
|
+
}>>, z.ZodCustom<TimeRange, TimeRange>]>;
|
|
770
|
+
/**
|
|
771
|
+
* Sorts two time ranges. The range with the earlier start time is considered less than
|
|
772
|
+
* the range with the later start time. If the start times are equal, the range with the
|
|
773
|
+
* earlier end time is considered less than the range with the later end time.
|
|
774
|
+
*
|
|
775
|
+
* @param a - The first time range.
|
|
776
|
+
* @param b - The second time range.
|
|
777
|
+
* @returns A number indicating the order of the two time ranges. This number is
|
|
778
|
+
* positive if a is earlier than b, negative if a is later than b, and 0 if they are
|
|
779
|
+
* equal.
|
|
780
|
+
*/
|
|
781
|
+
static sort(a: TimeRange, b: TimeRange): number;
|
|
615
782
|
}
|
|
616
|
-
export declare const sortTimeRange: (a: TimeRange, b: TimeRange) => -1 | 0 | 1;
|
|
617
783
|
/** DataType is a string that represents a data type. */
|
|
618
|
-
export declare class DataType implements Stringer {
|
|
619
|
-
readonly value: string;
|
|
620
|
-
readonly encodeValue = true;
|
|
621
|
-
valueOf(): string;
|
|
784
|
+
export declare class DataType extends primitive.ValueExtension<string> implements primitive.Stringer {
|
|
622
785
|
constructor(value: CrudeDataType);
|
|
623
786
|
/**
|
|
624
787
|
* @returns the TypedArray constructor for the DataType.
|
|
@@ -634,20 +797,60 @@ export declare class DataType implements Stringer {
|
|
|
634
797
|
matches(...others: CrudeDataType[]): boolean;
|
|
635
798
|
/** @returns a string representation of the DataType. */
|
|
636
799
|
toString(): string;
|
|
800
|
+
/**
|
|
801
|
+
* @returns true if the DataType has a variable density.
|
|
802
|
+
* @example DataType.STRING.isVariable // true
|
|
803
|
+
* @example DataType.INT32.isVariable // false
|
|
804
|
+
*/
|
|
637
805
|
get isVariable(): boolean;
|
|
806
|
+
/**
|
|
807
|
+
* @returns true if the DataType is numeric.
|
|
808
|
+
* @example DataType.INT32.isNumeric // true
|
|
809
|
+
* @example DataType.STRING.isNumeric // false
|
|
810
|
+
*/
|
|
638
811
|
get isNumeric(): boolean;
|
|
812
|
+
/**
|
|
813
|
+
* @returns true if the DataType is an integer.
|
|
814
|
+
* @example DataType.INT32.isInteger // true
|
|
815
|
+
* @example DataType.FLOAT32.isInteger // false
|
|
816
|
+
*/
|
|
639
817
|
get isInteger(): boolean;
|
|
818
|
+
/**
|
|
819
|
+
* @returns true if the DataType is a floating point number.
|
|
820
|
+
* @example DataType.FLOAT32.isFloat // true
|
|
821
|
+
* @example DataType.INT32.isFloat // false
|
|
822
|
+
*/
|
|
640
823
|
get isFloat(): boolean;
|
|
824
|
+
/**
|
|
825
|
+
* @returns the density of the DataType.
|
|
826
|
+
* @example DataType.INT16.density // Density.BIT32
|
|
827
|
+
* @example DataType.FLOAT32.density // Density.BIT32
|
|
828
|
+
*/
|
|
641
829
|
get density(): Density;
|
|
642
|
-
/**
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
830
|
+
/**
|
|
831
|
+
* @returns true if the DataType is an unsigned integer.
|
|
832
|
+
* @example DataType.UINT32.isUnsigned // true
|
|
833
|
+
* @example DataType.INT32.isUnsigned // false
|
|
834
|
+
*/
|
|
835
|
+
get isUnsignedInteger(): boolean;
|
|
836
|
+
/**
|
|
837
|
+
* @returns true if the DataType is a signed integer.
|
|
838
|
+
* @example DataType.INT32.isSigned // true
|
|
839
|
+
* @example DataType.UINT32.isSigned // false
|
|
840
|
+
*/
|
|
841
|
+
get isSignedInteger(): boolean;
|
|
646
842
|
/** @returns true if the data type can be cast to the other data type without loss of precision. */
|
|
647
843
|
canSafelyCastTo(other: DataType): boolean;
|
|
648
844
|
/** @returns true if the data type can be cast to the other data type, even if there is a loss of precision. */
|
|
649
845
|
canCastTo(other: DataType): boolean;
|
|
650
|
-
|
|
846
|
+
/**
|
|
847
|
+
* Checks whether the given TypedArray is of the same type as the DataType.
|
|
848
|
+
*
|
|
849
|
+
* @param array - The TypedArray to check.
|
|
850
|
+
* @returns True if the TypedArray is of the same type as the DataType.
|
|
851
|
+
*/
|
|
852
|
+
checkArray(array: TypedArray): boolean;
|
|
853
|
+
/** @returns true if the data type uses bigints to store values. */
|
|
651
854
|
get usesBigInt(): boolean;
|
|
652
855
|
/** Represents an Unknown/Invalid DataType. */
|
|
653
856
|
static readonly UNKNOWN: DataType;
|
|
@@ -683,32 +886,41 @@ export declare class DataType implements Stringer {
|
|
|
683
886
|
/** Represents a JSON data type. JSON has an unknown density, and is separated by a
|
|
684
887
|
* newline character. */
|
|
685
888
|
static readonly JSON: DataType;
|
|
686
|
-
static readonly ARRAY_CONSTRUCTORS
|
|
687
|
-
static readonly ARRAY_CONSTRUCTOR_DATA_TYPES
|
|
688
|
-
static readonly DENSITIES
|
|
889
|
+
private static readonly ARRAY_CONSTRUCTORS;
|
|
890
|
+
private static readonly ARRAY_CONSTRUCTOR_DATA_TYPES;
|
|
891
|
+
private static readonly DENSITIES;
|
|
689
892
|
/** All the data types. */
|
|
690
893
|
static readonly ALL: DataType[];
|
|
691
894
|
static readonly BIG_INT_TYPES: DataType[];
|
|
692
895
|
/** A zod schema for a DataType. */
|
|
693
|
-
static readonly z: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DataType, string>>, z.ZodCustom<DataType,
|
|
896
|
+
static readonly z: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DataType, string>>, z.ZodCustom<DataType, DataType>]>;
|
|
694
897
|
}
|
|
695
898
|
/**
|
|
696
|
-
* The Size of an
|
|
899
|
+
* The Size of an element in bytes.
|
|
697
900
|
*/
|
|
698
|
-
export declare class Size extends
|
|
901
|
+
export declare class Size extends primitive.ValueExtension<number> implements primitive.Stringer {
|
|
699
902
|
constructor(value: CrudeSize);
|
|
700
903
|
/** @returns true if the Size is larger than the other size. */
|
|
701
904
|
largerThan(other: CrudeSize): boolean;
|
|
702
905
|
/** @returns true if the Size is smaller than the other size. */
|
|
703
906
|
smallerThan(other: CrudeSize): boolean;
|
|
907
|
+
/** @returns a new Size representing the sum of the two Sizes. */
|
|
704
908
|
add(other: CrudeSize): Size;
|
|
909
|
+
/** @returns a new Size representing the difference of the two Sizes. */
|
|
705
910
|
sub(other: CrudeSize): Size;
|
|
911
|
+
/** @returns a new Size representing the truncated value of the Size. */
|
|
706
912
|
truncate(span: CrudeSize): Size;
|
|
913
|
+
/** @returns a new Size representing the remainder of the Size. */
|
|
707
914
|
remainder(span: CrudeSize): Size;
|
|
915
|
+
/** @returns the number of gigabytes in the Size. */
|
|
708
916
|
get gigabytes(): number;
|
|
917
|
+
/** @returns the number of megabytes in the Size. */
|
|
709
918
|
get megabytes(): number;
|
|
919
|
+
/** @returns the number of kilobytes in the Size. */
|
|
710
920
|
get kilobytes(): number;
|
|
921
|
+
/** @returns the number of terabytes in the Size. */
|
|
711
922
|
get terabytes(): number;
|
|
923
|
+
/** @returns a nicely formatted string representation of the Size. */
|
|
712
924
|
toString(): string;
|
|
713
925
|
/**
|
|
714
926
|
* Creates a Size from the given number of bytes.
|
|
@@ -758,20 +970,21 @@ export declare class Size extends Number implements Stringer {
|
|
|
758
970
|
/** The zero value for Size */
|
|
759
971
|
static readonly ZERO: Size;
|
|
760
972
|
/** A zod schema for a Size. */
|
|
761
|
-
static readonly z: z.ZodUnion<readonly [z.ZodPipe<z.ZodNumber, z.ZodTransform<Size, number>>, z.ZodCustom<Size,
|
|
973
|
+
static readonly z: z.ZodUnion<readonly [z.ZodPipe<z.ZodNumber, z.ZodTransform<Size, number>>, z.ZodCustom<Size, Size>]>;
|
|
974
|
+
/** @returns true if the Size is zero. */
|
|
762
975
|
get isZero(): boolean;
|
|
763
976
|
}
|
|
764
|
-
export type CrudeTimeStamp = bigint |
|
|
977
|
+
export type CrudeTimeStamp = bigint | TimeStamp | TimeSpan | number | Date | string | DateComponents;
|
|
765
978
|
export type TimeStampT = number;
|
|
766
|
-
export type CrudeTimeSpan = bigint |
|
|
979
|
+
export type CrudeTimeSpan = bigint | TimeSpan | TimeStamp | number | Rate;
|
|
767
980
|
export type TimeSpanT = number;
|
|
768
|
-
export type CrudeRate = Rate | number
|
|
981
|
+
export type CrudeRate = Rate | number;
|
|
769
982
|
export type RateT = number;
|
|
770
|
-
export type CrudeDensity = Density | number
|
|
983
|
+
export type CrudeDensity = Density | number;
|
|
771
984
|
export type DensityT = number;
|
|
772
985
|
export type CrudeDataType = DataType | string | TypedArray;
|
|
773
986
|
export type DataTypeT = string;
|
|
774
|
-
export type CrudeSize = Size | number
|
|
987
|
+
export type CrudeSize = Size | number;
|
|
775
988
|
export type SizeT = number;
|
|
776
989
|
export interface CrudeTimeRange {
|
|
777
990
|
start: CrudeTimeStamp;
|
|
@@ -785,12 +998,12 @@ export interface NumericTimeRange {
|
|
|
785
998
|
start: number;
|
|
786
999
|
end: number;
|
|
787
1000
|
}
|
|
788
|
-
export declare const typedArrayZ: z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>,
|
|
1001
|
+
export declare const typedArrayZ: z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint16Array<ArrayBuffer>, Uint16Array<ArrayBuffer>>, z.ZodCustom<Uint32Array<ArrayBuffer>, Uint32Array<ArrayBuffer>>, z.ZodCustom<BigUint64Array<ArrayBuffer>, BigUint64Array<ArrayBuffer>>, z.ZodCustom<Float32Array<ArrayBuffer>, Float32Array<ArrayBuffer>>, z.ZodCustom<Float64Array<ArrayBuffer>, Float64Array<ArrayBuffer>>, z.ZodCustom<Int8Array<ArrayBuffer>, Int8Array<ArrayBuffer>>, z.ZodCustom<Int16Array<ArrayBuffer>, Int16Array<ArrayBuffer>>, z.ZodCustom<Int32Array<ArrayBuffer>, Int32Array<ArrayBuffer>>, z.ZodCustom<BigInt64Array<ArrayBuffer>, BigInt64Array<ArrayBuffer>>]>;
|
|
789
1002
|
export type TypedArray = z.infer<typeof typedArrayZ>;
|
|
790
1003
|
type TypedArrayConstructor = Uint8ArrayConstructor | Uint16ArrayConstructor | Uint32ArrayConstructor | BigUint64ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor | Int8ArrayConstructor | Int16ArrayConstructor | Int32ArrayConstructor | BigInt64ArrayConstructor;
|
|
791
1004
|
export type TelemValue = number | bigint | string | boolean | Date | TimeStamp | TimeSpan;
|
|
792
1005
|
export declare const isTelemValue: (value: unknown) => value is TelemValue;
|
|
793
|
-
export declare const convertDataType: (source: DataType, target: DataType, value: math.Numeric, offset?: math.Numeric) => math.
|
|
1006
|
+
export declare const convertDataType: (source: DataType, target: DataType, value: math.Numeric, offset?: math.Numeric) => math.Numeric;
|
|
794
1007
|
export declare const addSamples: (a: math.Numeric, b: math.Numeric) => math.Numeric;
|
|
795
1008
|
export {};
|
|
796
1009
|
//# sourceMappingURL=telem.d.ts.map
|