@meshagent/meshagent 0.19.0 → 0.19.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/CHANGELOG.md
CHANGED
|
@@ -13,6 +13,11 @@ export declare abstract class DataType {
|
|
|
13
13
|
static text(): TextDataType;
|
|
14
14
|
static binary(): BinaryDataType;
|
|
15
15
|
}
|
|
16
|
+
export declare class BoolDataType extends DataType {
|
|
17
|
+
constructor();
|
|
18
|
+
static fromJson(data: any): IntDataType;
|
|
19
|
+
toJson(): Record<string, unknown>;
|
|
20
|
+
}
|
|
16
21
|
export declare class IntDataType extends DataType {
|
|
17
22
|
constructor();
|
|
18
23
|
static fromJson(data: any): IntDataType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BinaryDataType = exports.TextDataType = exports.VectorDataType = exports.FloatDataType = exports.DateDataType = exports.IntDataType = exports.DataType = exports._dataTypes = void 0;
|
|
3
|
+
exports.BinaryDataType = exports.TextDataType = exports.VectorDataType = exports.FloatDataType = exports.DateDataType = exports.IntDataType = exports.BoolDataType = exports.DataType = exports._dataTypes = void 0;
|
|
4
4
|
exports._dataTypes = {};
|
|
5
5
|
class DataType {
|
|
6
6
|
constructor(_) { }
|
|
@@ -31,6 +31,22 @@ class DataType {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
exports.DataType = DataType;
|
|
34
|
+
class BoolDataType extends DataType {
|
|
35
|
+
constructor() {
|
|
36
|
+
super();
|
|
37
|
+
}
|
|
38
|
+
static fromJson(data) {
|
|
39
|
+
if (data.type !== "bool") {
|
|
40
|
+
throw new Error(`Expected type 'bool', got '${data.type}'`);
|
|
41
|
+
}
|
|
42
|
+
return new BoolDataType();
|
|
43
|
+
}
|
|
44
|
+
toJson() {
|
|
45
|
+
return { type: "bool" };
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.BoolDataType = BoolDataType;
|
|
49
|
+
exports._dataTypes["bool"] = BoolDataType;
|
|
34
50
|
class IntDataType extends DataType {
|
|
35
51
|
constructor() {
|
|
36
52
|
super();
|
package/dist/esm/data-types.d.ts
CHANGED
|
@@ -13,6 +13,11 @@ export declare abstract class DataType {
|
|
|
13
13
|
static text(): TextDataType;
|
|
14
14
|
static binary(): BinaryDataType;
|
|
15
15
|
}
|
|
16
|
+
export declare class BoolDataType extends DataType {
|
|
17
|
+
constructor();
|
|
18
|
+
static fromJson(data: any): IntDataType;
|
|
19
|
+
toJson(): Record<string, unknown>;
|
|
20
|
+
}
|
|
16
21
|
export declare class IntDataType extends DataType {
|
|
17
22
|
constructor();
|
|
18
23
|
static fromJson(data: any): IntDataType;
|
package/dist/esm/data-types.js
CHANGED
|
@@ -27,6 +27,21 @@ export class DataType {
|
|
|
27
27
|
return new BinaryDataType();
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
+
export class BoolDataType extends DataType {
|
|
31
|
+
constructor() {
|
|
32
|
+
super();
|
|
33
|
+
}
|
|
34
|
+
static fromJson(data) {
|
|
35
|
+
if (data.type !== "bool") {
|
|
36
|
+
throw new Error(`Expected type 'bool', got '${data.type}'`);
|
|
37
|
+
}
|
|
38
|
+
return new BoolDataType();
|
|
39
|
+
}
|
|
40
|
+
toJson() {
|
|
41
|
+
return { type: "bool" };
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
_dataTypes["bool"] = BoolDataType;
|
|
30
45
|
export class IntDataType extends DataType {
|
|
31
46
|
constructor() {
|
|
32
47
|
super();
|
|
@@ -13,6 +13,11 @@ export declare abstract class DataType {
|
|
|
13
13
|
static text(): TextDataType;
|
|
14
14
|
static binary(): BinaryDataType;
|
|
15
15
|
}
|
|
16
|
+
export declare class BoolDataType extends DataType {
|
|
17
|
+
constructor();
|
|
18
|
+
static fromJson(data: any): IntDataType;
|
|
19
|
+
toJson(): Record<string, unknown>;
|
|
20
|
+
}
|
|
16
21
|
export declare class IntDataType extends DataType {
|
|
17
22
|
constructor();
|
|
18
23
|
static fromJson(data: any): IntDataType;
|
package/dist/node/data-types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BinaryDataType = exports.TextDataType = exports.VectorDataType = exports.FloatDataType = exports.DateDataType = exports.IntDataType = exports.DataType = exports._dataTypes = void 0;
|
|
3
|
+
exports.BinaryDataType = exports.TextDataType = exports.VectorDataType = exports.FloatDataType = exports.DateDataType = exports.IntDataType = exports.BoolDataType = exports.DataType = exports._dataTypes = void 0;
|
|
4
4
|
exports._dataTypes = {};
|
|
5
5
|
class DataType {
|
|
6
6
|
constructor(_) { }
|
|
@@ -31,6 +31,22 @@ class DataType {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
exports.DataType = DataType;
|
|
34
|
+
class BoolDataType extends DataType {
|
|
35
|
+
constructor() {
|
|
36
|
+
super();
|
|
37
|
+
}
|
|
38
|
+
static fromJson(data) {
|
|
39
|
+
if (data.type !== "bool") {
|
|
40
|
+
throw new Error(`Expected type 'bool', got '${data.type}'`);
|
|
41
|
+
}
|
|
42
|
+
return new BoolDataType();
|
|
43
|
+
}
|
|
44
|
+
toJson() {
|
|
45
|
+
return { type: "bool" };
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.BoolDataType = BoolDataType;
|
|
49
|
+
exports._dataTypes["bool"] = BoolDataType;
|
|
34
50
|
class IntDataType extends DataType {
|
|
35
51
|
constructor() {
|
|
36
52
|
super();
|