node-opcua-variant
Advanced tools
Comparing version 2.6.0-alpha.6 to 2.6.0-alpha.7
@@ -39,3 +39,3 @@ /// <reference types="node" /> | ||
export declare function isValidVariant(arrayType: VariantArrayType, dataType: DataType, value: any, dimensions?: number[] | null): boolean; | ||
export declare function buildVariantArray(dataType: DataType, nbElements: number, defaultValue: any): any[] | Uint8Array | Uint16Array | Uint32Array | Int8Array | Int16Array | Int32Array | Float32Array | Float64Array; | ||
export declare function buildVariantArray(dataType: DataType, nbElements: number, defaultValue: any): any[] | Float32Array | Float64Array | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array; | ||
export declare function sameVariant(v1: Variant, v2: Variant): boolean; | ||
@@ -42,0 +42,0 @@ export interface VariantOptionsT<T, DT extends DataType> extends VariantOptions { |
@@ -342,3 +342,3 @@ "use strict"; | ||
function get_encoder(dataType) { | ||
const dataTypeAsString = DataType_enum_1.DataType[dataType]; | ||
const dataTypeAsString = typeof dataType === "string" ? dataType : DataType_enum_1.DataType[dataType]; | ||
const encode = node_opcua_factory_1.findBuiltInType(dataTypeAsString).encode; | ||
@@ -774,2 +774,9 @@ if (!encode) { | ||
node_opcua_factory_1.registerSpecialVariantEncoder(Variant); | ||
node_opcua_factory_1.registerType({ | ||
name: "Variant", | ||
subType: "", | ||
coerce: _coerceVariant, | ||
encode: encodeVariant, | ||
decode: decodeVariant | ||
}); | ||
//# sourceMappingURL=variant.js.map |
{ | ||
"name": "node-opcua-variant", | ||
"version": "2.6.0-alpha.6", | ||
"version": "2.6.0-alpha.7", | ||
"description": "pure nodejs OPCUA SDK - module -variant", | ||
@@ -15,6 +15,6 @@ "main": "./dist/index.js", | ||
"node-opcua-basic-types": "^2.6.0-alpha.1", | ||
"node-opcua-data-model": "^2.6.0-alpha.1", | ||
"node-opcua-data-model": "^2.6.0-alpha.7", | ||
"node-opcua-enum": "^2.6.0-alpha.1", | ||
"node-opcua-extension-object": "^2.6.0-alpha.1", | ||
"node-opcua-factory": "^2.6.0-alpha.1", | ||
"node-opcua-extension-object": "^2.6.0-alpha.7", | ||
"node-opcua-factory": "^2.6.0-alpha.7", | ||
"node-opcua-nodeid": "^2.6.0-alpha.1", | ||
@@ -28,4 +28,4 @@ "node-opcua-utils": "^2.6.0-alpha.1", | ||
"node-opcua-debug": "^2.6.0-alpha.1", | ||
"node-opcua-numeric-range": "^2.6.0-alpha.1", | ||
"node-opcua-packet-analyzer": "^2.6.0-alpha.1", | ||
"node-opcua-numeric-range": "^2.6.0-alpha.7", | ||
"node-opcua-packet-analyzer": "^2.6.0-alpha.7", | ||
"node-opcua-status-code": "^2.6.0-alpha.1", | ||
@@ -50,3 +50,3 @@ "should": "^13.2.3", | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "8c187b05d678baf80703dec448e9d9ed1813ba16" | ||
"gitHead": "6af0c6f183dcb96ddc5a2befc98851d0960c5fd0" | ||
} |
@@ -36,3 +36,4 @@ /** | ||
registerSpecialVariantEncoder, | ||
StructuredTypeSchema | ||
StructuredTypeSchema, | ||
registerType | ||
} from "node-opcua-factory"; | ||
@@ -515,4 +516,3 @@ | ||
function get_encoder(dataType: DataType) { | ||
const dataTypeAsString = DataType[dataType]; | ||
const dataTypeAsString = typeof dataType === "string" ? dataType : DataType[dataType]; | ||
const encode = findBuiltInType(dataTypeAsString).encode; | ||
@@ -1074,1 +1074,10 @@ /* istanbul ignore next */ | ||
export declare type VariantDouble = VariantT<number, DataType.Double>; | ||
registerType({ | ||
name: "Variant", | ||
subType: "", | ||
coerce: _coerceVariant, | ||
encode: encodeVariant, | ||
decode: decodeVariant | ||
}) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
107680
1945