@synnaxlabs/x 0.13.0 → 0.14.2
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 +5 -5
- package/dist/binary/encoder.d.ts +2 -22
- package/dist/telem/generate.d.ts +2 -2
- package/dist/telem/series.d.ts +10 -6
- package/dist/telem/telem.d.ts +85 -24
- package/dist/x.cjs +11 -9637
- package/dist/x.cjs.map +1 -1
- package/dist/x.js +4760 -7602
- package/dist/x.js.map +1 -1
- package/package.json +3 -3
- package/src/binary/encoder.ts +13 -37
- package/src/primitive.ts +1 -1
- package/src/telem/generate.ts +2 -2
- package/src/telem/series.spec.ts +102 -7
- package/src/telem/series.ts +164 -58
- package/src/telem/telem.spec.ts +31 -1
- package/src/telem/telem.ts +148 -69
- package/vite.config.ts +1 -1
- package/dist/telem/encode.d.ts +0 -1
- package/src/telem/encode.ts +0 -22
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @synnaxlabs/x@0.
|
|
2
|
+
> @synnaxlabs/x@0.14.2 build /home/runner/work/synnax/synnax/x/ts
|
|
3
3
|
> tsc --noEmit && vite build
|
|
4
4
|
|
|
5
5
|
[36mvite v5.1.2 [32mbuilding for production...[36m[39m
|
|
@@ -10,8 +10,8 @@ rendering chunks...
|
|
|
10
10
|
[32m
|
|
11
11
|
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
12
12
|
computing gzip size...
|
|
13
|
-
[2mdist/[22m[36mx.js [39m[1m[
|
|
14
|
-
[32m[36m[vite:dts][32m Declaration files built in
|
|
13
|
+
[2mdist/[22m[36mx.js [39m[1m[2m213.15 kB[22m[1m[22m[2m │ gzip: 49.72 kB[22m[2m │ map: 639.91 kB[22m
|
|
14
|
+
[32m[36m[vite:dts][32m Declaration files built in 3061ms.
|
|
15
15
|
[39m
|
|
16
|
-
[2mdist/[22m[36mx.cjs [39m[1m[
|
|
17
|
-
[32m✓ built in 3.
|
|
16
|
+
[2mdist/[22m[36mx.cjs [39m[1m[2m140.09 kB[22m[1m[22m[2m │ gzip: 39.81 kB[22m[2m │ map: 619.46 kB[22m
|
|
17
|
+
[32m✓ built in 3.99s[39m
|
package/dist/binary/encoder.d.ts
CHANGED
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import { type ZodSchema, type z } from "zod";
|
|
2
|
-
/**
|
|
3
|
-
* CustomTypeEncoder is an interface for a class that needs to transform its
|
|
4
|
-
* value before encoding.
|
|
5
|
-
*/
|
|
6
|
-
interface CustomTypeEncoder {
|
|
7
|
-
/** The Class the custom encoder is set for */
|
|
8
|
-
Class: Function;
|
|
9
|
-
/**
|
|
10
|
-
* The function that transforms the value before encoding;
|
|
11
|
-
*
|
|
12
|
-
* @param instance - The instance of the class to transform.
|
|
13
|
-
* @returns The transformed value.
|
|
14
|
-
*/
|
|
15
|
-
write: <P>(instance: P) => unknown;
|
|
16
|
-
}
|
|
17
2
|
/**
|
|
18
3
|
* EncoderDecoder is an entity that encodes and decodes messages to and from a
|
|
19
4
|
* binary format.
|
|
@@ -36,24 +21,19 @@ export interface EncoderDecoder {
|
|
|
36
21
|
*/
|
|
37
22
|
decode: <P>(data: Uint8Array | ArrayBuffer, schema?: ZodSchema<P>) => P;
|
|
38
23
|
}
|
|
39
|
-
interface StaticEncoderDecoder {
|
|
40
|
-
registerCustomType: (encoder: CustomTypeEncoder) => void;
|
|
41
|
-
}
|
|
42
24
|
/** MsgpackEncoderDecoder is a msgpack implementation of EncoderDecoder. */
|
|
43
25
|
export declare class MsgpackEncoderDecoder implements EncoderDecoder {
|
|
44
26
|
contentType: string;
|
|
45
27
|
encode(payload: unknown): ArrayBuffer;
|
|
46
28
|
decode<P extends z.ZodTypeAny>(data: Uint8Array | ArrayBuffer, schema?: P): z.output<P>;
|
|
47
|
-
static registerCustomType(encoder: CustomTypeEncoder): void;
|
|
48
29
|
}
|
|
49
30
|
/** JSONEncoderDecoder is a JSON implementation of EncoderDecoder. */
|
|
50
31
|
export declare class JSONEncoderDecoder implements EncoderDecoder {
|
|
51
32
|
contentType: string;
|
|
33
|
+
readonly decoder: TextDecoder;
|
|
34
|
+
constructor();
|
|
52
35
|
encode(payload: unknown): ArrayBuffer;
|
|
53
36
|
decode<P extends z.ZodTypeAny>(data: Uint8Array | ArrayBuffer, schema?: P): z.output<P>;
|
|
54
37
|
static registerCustomType(): void;
|
|
55
38
|
}
|
|
56
39
|
export declare const ENCODERS: EncoderDecoder[];
|
|
57
|
-
export declare const ENCODER_CLASSES: StaticEncoderDecoder[];
|
|
58
|
-
export declare const registerCustomTypeEncoder: (encoder: CustomTypeEncoder) => void;
|
|
59
|
-
export {};
|
package/dist/telem/generate.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DataTypeT,
|
|
2
|
-
export declare const randomSeries: (length: number, dataType: DataTypeT) =>
|
|
1
|
+
import { type DataTypeT, type TypedArray } from './telem';
|
|
2
|
+
export declare const randomSeries: (length: number, dataType: DataTypeT) => TypedArray;
|
package/dist/telem/series.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type z } from "zod";
|
|
2
2
|
import { bounds } from '../spatial';
|
|
3
3
|
import { type GLBufferController, type GLBufferUsage } from './gl';
|
|
4
|
-
import { DataType, type
|
|
4
|
+
import { DataType, type TypedArray, type Rate, Size, TimeRange, TimeStamp, type CrudeDataType, type TelemValue } from './telem';
|
|
5
5
|
export type SampleValue = number | bigint;
|
|
6
6
|
export interface SeriesDigest {
|
|
7
7
|
key: string;
|
|
@@ -20,8 +20,10 @@ interface BaseSeriesProps {
|
|
|
20
20
|
alignment?: number;
|
|
21
21
|
key?: string;
|
|
22
22
|
}
|
|
23
|
+
export type CrudeSeries = Series | ArrayBuffer | TypedArray | string[] | number[] | boolean[] | unknown[] | TimeStamp[] | Date[] | TelemValue;
|
|
24
|
+
export declare const isCrudeSeries: (value: unknown) => value is CrudeSeries;
|
|
23
25
|
export interface SeriesProps extends BaseSeriesProps {
|
|
24
|
-
data:
|
|
26
|
+
data: CrudeSeries;
|
|
25
27
|
}
|
|
26
28
|
export interface SeriesAllocProps extends BaseSeriesProps {
|
|
27
29
|
capacity: number;
|
|
@@ -56,19 +58,20 @@ export declare class Series {
|
|
|
56
58
|
readonly _timeRange?: TimeRange;
|
|
57
59
|
readonly alignment: number;
|
|
58
60
|
/** A cached minimum value. */
|
|
59
|
-
private
|
|
61
|
+
private _cachedMin?;
|
|
60
62
|
/** A cached maximum value. */
|
|
61
|
-
private
|
|
63
|
+
private _cachedMax?;
|
|
62
64
|
/** The write position of the buffer. */
|
|
63
65
|
private writePos;
|
|
64
66
|
/** Tracks the number of entities currently using this array. */
|
|
65
67
|
private _refCount;
|
|
68
|
+
private _cachedLength?;
|
|
69
|
+
constructor(props: SeriesProps | CrudeSeries);
|
|
66
70
|
static alloc({ capacity: length, dataType, ...props }: SeriesAllocProps): Series;
|
|
67
71
|
static generateTimestamps(length: number, rate: Rate, start: TimeStamp): Series;
|
|
68
72
|
get refCount(): number;
|
|
69
73
|
static fromStrings(data: string[], timeRange?: TimeRange): Series;
|
|
70
74
|
static fromJSON<T>(data: T[], timeRange?: TimeRange): Series;
|
|
71
|
-
constructor({ data, dataType, timeRange, sampleOffset, glBufferUsage, alignment, key, }: SeriesProps);
|
|
72
75
|
acquire(gl?: GLBufferController): void;
|
|
73
76
|
release(): void;
|
|
74
77
|
/**
|
|
@@ -84,7 +87,7 @@ export declare class Series {
|
|
|
84
87
|
get buffer(): ArrayBufferLike;
|
|
85
88
|
private get underlyingData();
|
|
86
89
|
/** @returns a native typed array with the proper data type. */
|
|
87
|
-
get data():
|
|
90
|
+
get data(): TypedArray;
|
|
88
91
|
toStrings(): string[];
|
|
89
92
|
toUUIDs(): string[];
|
|
90
93
|
parseJSON<Z extends z.ZodTypeAny>(schema: Z): Array<z.output<Z>>;
|
|
@@ -98,6 +101,7 @@ export declare class Series {
|
|
|
98
101
|
get byteLength(): Size;
|
|
99
102
|
/** @returns the number of samples in this array. */
|
|
100
103
|
get length(): number;
|
|
104
|
+
private calculateCachedLength;
|
|
101
105
|
/**
|
|
102
106
|
* Creates a new array with a different data type.
|
|
103
107
|
* @param target the data type to convert to.
|
package/dist/telem/telem.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export type DateComponents = [number?, number?, number?];
|
|
|
16
16
|
* 1. A number representing the number of milliseconds since the Unix epoch.
|
|
17
17
|
* 2. A javascript Date object.
|
|
18
18
|
* 3. An array of numbers satisfying the DateComponents type, where the first element is the
|
|
19
|
-
* year, the second is the month, and the third is the day. To
|
|
19
|
+
* year, the second is the month, and the third is the day. To incraase resolution
|
|
20
20
|
* when using this method, use the add method. It's important to note that this initializes
|
|
21
21
|
* a timestamp at midnight UTC, regardless of the timezone specified.
|
|
22
22
|
* 4. An ISO compliant date or date time string. The time zone component is ignored.
|
|
@@ -29,9 +29,13 @@ export type DateComponents = [number?, number?, number?];
|
|
|
29
29
|
* @example ts = new TimeStamp([2021, 1, 1]).add(1 * TimeSpan.HOUR) // 1/1/2021 at 1am UTC
|
|
30
30
|
* @example ts = new TimeStamp("2021-01-01T12:30:00Z") // 1/1/2021 at 12:30pm UTC
|
|
31
31
|
*/
|
|
32
|
-
export declare class TimeStamp
|
|
32
|
+
export declare class TimeStamp implements Stringer {
|
|
33
|
+
private readonly value;
|
|
34
|
+
readonly encodeValue: true;
|
|
33
35
|
constructor(value?: CrudeTimeStamp, tzInfo?: TZInfo);
|
|
34
36
|
private static parseDate;
|
|
37
|
+
encode(): string;
|
|
38
|
+
valueOf(): bigint;
|
|
35
39
|
private static parseTimeString;
|
|
36
40
|
private static parseDateTimeString;
|
|
37
41
|
fString(format?: TimeStampStringFormat, tzInfo?: TZInfo): string;
|
|
@@ -153,13 +157,14 @@ export declare class TimeStamp extends Number implements Stringer {
|
|
|
153
157
|
/** @returns true if the day portion TimeStamp is today, false otherwise. */
|
|
154
158
|
get isToday(): boolean;
|
|
155
159
|
truncate(span: TimeSpan | TimeStamp): TimeStamp;
|
|
156
|
-
get bigInt(): bigint;
|
|
157
160
|
/**
|
|
158
161
|
* @returns A new TimeStamp representing the current time in UTC. It's important to
|
|
159
162
|
* note that this TimeStamp is only accurate to the millisecond level (that's the best
|
|
160
163
|
* JavaScript can do).
|
|
161
164
|
*/
|
|
162
165
|
static now(): TimeStamp;
|
|
166
|
+
static max(...timestamps: CrudeTimeStamp[]): TimeStamp;
|
|
167
|
+
static min(...timestamps: CrudeTimeStamp[]): TimeStamp;
|
|
163
168
|
/** @returns a new TimeStamp n nanoseconds after the unix epoch */
|
|
164
169
|
static nanoseconds(value: number): TimeStamp;
|
|
165
170
|
static readonly NANOSECOND: TimeStamp;
|
|
@@ -194,18 +199,29 @@ export declare class TimeStamp extends Number implements Stringer {
|
|
|
194
199
|
/** The unix epoch */
|
|
195
200
|
static readonly ZERO: TimeStamp;
|
|
196
201
|
/** A zod schema for validating timestamps */
|
|
197
|
-
static readonly z: z.ZodUnion<[z.ZodEffects<z.
|
|
202
|
+
static readonly z: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
203
|
+
value: z.ZodBigInt;
|
|
204
|
+
}, "strip", z.ZodTypeAny, {
|
|
205
|
+
value: bigint;
|
|
206
|
+
}, {
|
|
207
|
+
value: bigint;
|
|
208
|
+
}>, TimeStamp, {
|
|
209
|
+
value: bigint;
|
|
210
|
+
}>, z.ZodEffects<z.ZodString, TimeStamp, string>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, TimeStamp, Number>, z.ZodEffects<z.ZodNumber, TimeStamp, number>, z.ZodType<TimeStamp, z.ZodTypeDef, TimeStamp>]>;
|
|
198
211
|
}
|
|
199
212
|
/** TimeSpan represents a nanosecond precision duration. */
|
|
200
|
-
export declare class TimeSpan
|
|
213
|
+
export declare class TimeSpan implements Stringer {
|
|
214
|
+
private readonly value;
|
|
215
|
+
readonly encodeValue: true;
|
|
201
216
|
constructor(value: CrudeTimeSpan);
|
|
217
|
+
encode(): string;
|
|
218
|
+
valueOf(): bigint;
|
|
202
219
|
lessThan(other: CrudeTimeSpan): boolean;
|
|
203
220
|
greaterThan(other: CrudeTimeSpan): boolean;
|
|
204
221
|
lessThanOrEqual(other: CrudeTimeSpan): boolean;
|
|
205
222
|
greaterThanOrEqual(other: CrudeTimeSpan): boolean;
|
|
206
223
|
remainder(divisor: TimeSpan): TimeSpan;
|
|
207
224
|
truncate(span: TimeSpan): TimeSpan;
|
|
208
|
-
multiply(factor: number): TimeSpan;
|
|
209
225
|
toString(): string;
|
|
210
226
|
/** @returns the decimal number of days in the timespan */
|
|
211
227
|
get days(): number;
|
|
@@ -313,7 +329,15 @@ export declare class TimeSpan extends Number implements Stringer {
|
|
|
313
329
|
/** The zero value for a TimeSpan. */
|
|
314
330
|
static readonly ZERO: TimeSpan;
|
|
315
331
|
/** A zod schema for validating and transforming timespans */
|
|
316
|
-
static readonly z: z.ZodUnion<[z.ZodEffects<z.
|
|
332
|
+
static readonly z: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
333
|
+
value: z.ZodBigInt;
|
|
334
|
+
}, "strip", z.ZodTypeAny, {
|
|
335
|
+
value: bigint;
|
|
336
|
+
}, {
|
|
337
|
+
value: bigint;
|
|
338
|
+
}>, TimeSpan, {
|
|
339
|
+
value: bigint;
|
|
340
|
+
}>, z.ZodEffects<z.ZodString, TimeSpan, string>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, TimeSpan, Number>, z.ZodEffects<z.ZodNumber, TimeSpan, number>, z.ZodType<TimeSpan, z.ZodTypeDef, TimeSpan>]>;
|
|
317
341
|
}
|
|
318
342
|
/** Rate represents a data rate in Hz. */
|
|
319
343
|
export declare class Rate extends Number implements Stringer {
|
|
@@ -490,17 +514,49 @@ export declare class TimeRange implements Stringer {
|
|
|
490
514
|
static readonly ZERO: TimeRange;
|
|
491
515
|
/** A zod schema for validating and transforming time ranges */
|
|
492
516
|
static readonly z: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
493
|
-
start: z.ZodUnion<[z.ZodEffects<z.
|
|
494
|
-
|
|
517
|
+
start: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
518
|
+
value: z.ZodBigInt;
|
|
519
|
+
}, "strip", z.ZodTypeAny, {
|
|
520
|
+
value: bigint;
|
|
521
|
+
}, {
|
|
522
|
+
value: bigint;
|
|
523
|
+
}>, TimeStamp, {
|
|
524
|
+
value: bigint;
|
|
525
|
+
}>, z.ZodEffects<z.ZodString, TimeStamp, string>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, TimeStamp, Number>, z.ZodEffects<z.ZodNumber, TimeStamp, number>, z.ZodType<TimeStamp, z.ZodTypeDef, TimeStamp>]>;
|
|
526
|
+
end: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
527
|
+
value: z.ZodBigInt;
|
|
528
|
+
}, "strip", z.ZodTypeAny, {
|
|
529
|
+
value: bigint;
|
|
530
|
+
}, {
|
|
531
|
+
value: bigint;
|
|
532
|
+
}>, TimeStamp, {
|
|
533
|
+
value: bigint;
|
|
534
|
+
}>, z.ZodEffects<z.ZodString, TimeStamp, string>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, TimeStamp, Number>, z.ZodEffects<z.ZodNumber, TimeStamp, number>, z.ZodType<TimeStamp, z.ZodTypeDef, TimeStamp>]>;
|
|
495
535
|
}, "strip", z.ZodTypeAny, {
|
|
496
536
|
start: TimeStamp;
|
|
497
537
|
end: TimeStamp;
|
|
498
538
|
}, {
|
|
499
|
-
start: (
|
|
500
|
-
|
|
539
|
+
start: (string | number | Number | TimeStamp | {
|
|
540
|
+
value: bigint;
|
|
541
|
+
}) & (string | number | Number | TimeStamp | {
|
|
542
|
+
value: bigint;
|
|
543
|
+
} | undefined);
|
|
544
|
+
end: (string | number | Number | TimeStamp | {
|
|
545
|
+
value: bigint;
|
|
546
|
+
}) & (string | number | Number | TimeStamp | {
|
|
547
|
+
value: bigint;
|
|
548
|
+
} | undefined);
|
|
501
549
|
}>, TimeRange, {
|
|
502
|
-
start: (
|
|
503
|
-
|
|
550
|
+
start: (string | number | Number | TimeStamp | {
|
|
551
|
+
value: bigint;
|
|
552
|
+
}) & (string | number | Number | TimeStamp | {
|
|
553
|
+
value: bigint;
|
|
554
|
+
} | undefined);
|
|
555
|
+
end: (string | number | Number | TimeStamp | {
|
|
556
|
+
value: bigint;
|
|
557
|
+
}) & (string | number | Number | TimeStamp | {
|
|
558
|
+
value: bigint;
|
|
559
|
+
} | undefined);
|
|
504
560
|
}>, z.ZodType<TimeRange, z.ZodTypeDef, TimeRange>]>;
|
|
505
561
|
}
|
|
506
562
|
/** DataType is a string that represents a data type. */
|
|
@@ -509,10 +565,11 @@ export declare class DataType extends String implements Stringer {
|
|
|
509
565
|
/**
|
|
510
566
|
* @returns the TypedArray constructor for the DataType.
|
|
511
567
|
*/
|
|
512
|
-
get Array():
|
|
568
|
+
get Array(): TypedArrayConstructor;
|
|
513
569
|
equals(other: DataType): boolean;
|
|
514
570
|
/** @returns a string representation of the DataType. */
|
|
515
571
|
toString(): string;
|
|
572
|
+
get isVariable(): boolean;
|
|
516
573
|
get density(): Density;
|
|
517
574
|
/**
|
|
518
575
|
* Checks whether the given TypedArray is of the same type as the DataType.
|
|
@@ -520,7 +577,7 @@ export declare class DataType extends String implements Stringer {
|
|
|
520
577
|
* @param array - The TypedArray to check.
|
|
521
578
|
* @returns True if the TypedArray is of the same type as the DataType.
|
|
522
579
|
*/
|
|
523
|
-
checkArray(array:
|
|
580
|
+
checkArray(array: TypedArray): boolean;
|
|
524
581
|
toJSON(): string;
|
|
525
582
|
get usesBigInt(): boolean;
|
|
526
583
|
/** Represents an Unknown/Invalid DataType. */
|
|
@@ -545,6 +602,8 @@ export declare class DataType extends String implements Stringer {
|
|
|
545
602
|
static readonly UINT16: DataType;
|
|
546
603
|
/** Represents a 8-bit unsigned integer value. */
|
|
547
604
|
static readonly UINT8: DataType;
|
|
605
|
+
/** Represents a boolean value. Alias for UINT8. */
|
|
606
|
+
static readonly BOOLEAN: DataType;
|
|
548
607
|
/** Represents a 64-bit unix epoch. */
|
|
549
608
|
static readonly TIMESTAMP: DataType;
|
|
550
609
|
/** Represents a UUID data type */
|
|
@@ -555,7 +614,7 @@ export declare class DataType extends String implements Stringer {
|
|
|
555
614
|
/** Represents a JSON data type. JSON has an unknown density, and is separated by a
|
|
556
615
|
* newline character. */
|
|
557
616
|
static readonly JSON: DataType;
|
|
558
|
-
static readonly ARRAY_CONSTRUCTORS: Map<string,
|
|
617
|
+
static readonly ARRAY_CONSTRUCTORS: Map<string, TypedArrayConstructor>;
|
|
559
618
|
static readonly ARRAY_CONSTRUCTOR_DATA_TYPES: Map<string, DataType>;
|
|
560
619
|
static readonly DENSITIES: Map<string, Density>;
|
|
561
620
|
/** All the data types. */
|
|
@@ -633,15 +692,15 @@ export declare class Size extends Number implements Stringer {
|
|
|
633
692
|
static readonly z: z.ZodUnion<[z.ZodEffects<z.ZodNumber, Size, number>, z.ZodType<Size, z.ZodTypeDef, Size>]>;
|
|
634
693
|
get isZero(): boolean;
|
|
635
694
|
}
|
|
636
|
-
export type CrudeTimeStamp = TimeStamp | TimeSpan | number | Date | string | DateComponents | Number;
|
|
695
|
+
export type CrudeTimeStamp = bigint | BigInt | TimeStamp | TimeSpan | number | Date | string | DateComponents | Number;
|
|
637
696
|
export type TimeStampT = number;
|
|
638
|
-
export type CrudeTimeSpan = TimeSpan | TimeStamp | number | Number;
|
|
697
|
+
export type CrudeTimeSpan = bigint | BigInt | TimeSpan | TimeStamp | number | Number;
|
|
639
698
|
export type TimeSpanT = number;
|
|
640
699
|
export type CrudeRate = Rate | number | Number;
|
|
641
700
|
export type RateT = number;
|
|
642
701
|
export type CrudeDensity = Density | number | Number;
|
|
643
702
|
export type DensityT = number;
|
|
644
|
-
export type CrudeDataType = DataType | string |
|
|
703
|
+
export type CrudeDataType = DataType | string | TypedArray;
|
|
645
704
|
export type DataTypeT = string;
|
|
646
705
|
export type CrudeSize = Size | number | Number;
|
|
647
706
|
export type SizeT = number;
|
|
@@ -649,9 +708,11 @@ export interface CrudeTimeRange {
|
|
|
649
708
|
start: CrudeTimeStamp;
|
|
650
709
|
end: CrudeTimeStamp;
|
|
651
710
|
}
|
|
652
|
-
export declare const
|
|
653
|
-
export type
|
|
654
|
-
type
|
|
655
|
-
type
|
|
656
|
-
export
|
|
711
|
+
export declare const typedArrayZ: z.ZodUnion<[z.ZodType<Uint8Array, z.ZodTypeDef, Uint8Array>, z.ZodType<Uint16Array, z.ZodTypeDef, Uint16Array>, z.ZodType<Uint32Array, z.ZodTypeDef, Uint32Array>, z.ZodType<BigUint64Array, z.ZodTypeDef, BigUint64Array>, z.ZodType<Float32Array, z.ZodTypeDef, Float32Array>, z.ZodType<Float64Array, z.ZodTypeDef, Float64Array>, z.ZodType<Int8Array, z.ZodTypeDef, Int8Array>, z.ZodType<Int16Array, z.ZodTypeDef, Int16Array>, z.ZodType<Int32Array, z.ZodTypeDef, Int32Array>, z.ZodType<BigInt64Array, z.ZodTypeDef, BigInt64Array>]>;
|
|
712
|
+
export type TypedArray = z.infer<typeof typedArrayZ>;
|
|
713
|
+
type TypedArrayConstructor = Uint8ArrayConstructor | Uint16ArrayConstructor | Uint32ArrayConstructor | BigUint64ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor | Int8ArrayConstructor | Int16ArrayConstructor | Int32ArrayConstructor | BigInt64ArrayConstructor;
|
|
714
|
+
type NumericTelemValue = number | bigint;
|
|
715
|
+
export type TelemValue = number | bigint | string | boolean | Date | TimeStamp | TimeSpan;
|
|
716
|
+
export declare const isTelemValue: (value: unknown) => value is TelemValue;
|
|
717
|
+
export declare const convertDataType: (source: DataType, target: DataType, value: NumericTelemValue, offset?: number | bigint) => NumericTelemValue;
|
|
657
718
|
export {};
|