diff --git a/packages/binding-modbus/src/modbus-client.ts b/packages/binding-modbus/src/modbus-client.ts index ad06f03a8..ff31d50bb 100644 --- a/packages/binding-modbus/src/modbus-client.ts +++ b/packages/binding-modbus/src/modbus-client.ts @@ -276,8 +276,8 @@ export default class ModbusClient implements ProtocolClient { mode === "r" ? ModbusFunction.readCoil : contentLength > 1 - ? ModbusFunction.writeMultipleCoils - : ModbusFunction.writeSingleCoil; + ? ModbusFunction.writeMultipleCoils + : ModbusFunction.writeSingleCoil; break; case "HoldingRegister": // the content length must be divided by 2 (holding registers are 16bit) @@ -285,8 +285,8 @@ export default class ModbusClient implements ProtocolClient { mode === "r" ? ModbusFunction.readHoldingRegisters : contentLength / 2 > 1 - ? ModbusFunction.writeMultipleHoldingRegisters - : ModbusFunction.writeSingleHoldingRegister; + ? ModbusFunction.writeMultipleHoldingRegisters + : ModbusFunction.writeSingleHoldingRegister; break; case "InputRegister": result["modv:function"] = ModbusFunction.readInputRegister; diff --git a/packages/binding-opcua/src/opcua-protocol-client.ts b/packages/binding-opcua/src/opcua-protocol-client.ts index 5ad919d4d..e30bee8f4 100644 --- a/packages/binding-opcua/src/opcua-protocol-client.ts +++ b/packages/binding-opcua/src/opcua-protocol-client.ts @@ -590,8 +590,8 @@ export class OPCUAProtocolClient implements ProtocolClient { valueRank === -1 ? VariantArrayType.Scalar : valueRank === 1 - ? VariantArrayType.Array - : VariantArrayType.Matrix; + ? VariantArrayType.Array + : VariantArrayType.Matrix; const n = (a: unknown) => Buffer.from(JSON.stringify(a)); const v = await this._contentToVariant(content2.type, n(bodyInput[name ?? "null"]), basicDataType); diff --git a/packages/core/src/codecs/octetstream-codec.ts b/packages/core/src/codecs/octetstream-codec.ts index 5aec25931..aae832c51 100644 --- a/packages/core/src/codecs/octetstream-codec.ts +++ b/packages/core/src/codecs/octetstream-codec.ts @@ -183,8 +183,8 @@ export default class OctetstreamCodec implements ContentCodec { ? bytes.readInt16BE(0) : bytes.readUInt16BE(0) : signed - ? bytes.readInt16LE(0) - : bytes.readUInt16LE(0); + ? bytes.readInt16LE(0) + : bytes.readUInt16LE(0); case 32: return bigEndian @@ -192,8 +192,8 @@ export default class OctetstreamCodec implements ContentCodec { ? bytes.readInt32BE(0) : bytes.readUInt32BE(0) : signed - ? bytes.readInt32LE(0) - : bytes.readUInt32LE(0); + ? bytes.readInt32LE(0) + : bytes.readUInt32LE(0); default: { const result = bigEndian @@ -201,8 +201,8 @@ export default class OctetstreamCodec implements ContentCodec { ? bytes.readIntBE(0, dataLength / 8) : bytes.readUIntBE(0, dataLength / 8) : signed - ? bytes.readIntLE(0, dataLength / 8) - : bytes.readUIntLE(0, dataLength / 8); + ? bytes.readIntLE(0, dataLength / 8) + : bytes.readUIntLE(0, dataLength / 8); // warn about numbers being too big to be represented as safe integers if (!Number.isSafeInteger(result)) { warn("Result is not a safe integer"); @@ -460,8 +460,8 @@ export default class OctetstreamCodec implements ContentCodec { ? buf.writeInt16BE(value, 0) : buf.writeUInt16BE(value, 0) : signed - ? buf.writeInt16LE(value, 0) - : buf.writeUInt16LE(value, 0); + ? buf.writeInt16LE(value, 0) + : buf.writeUInt16LE(value, 0); break; case 4: @@ -470,8 +470,8 @@ export default class OctetstreamCodec implements ContentCodec { ? buf.writeInt32BE(value, 0) : buf.writeUInt32BE(value, 0) : signed - ? buf.writeInt32LE(value, 0) - : buf.writeUInt32LE(value, 0); + ? buf.writeInt32LE(value, 0) + : buf.writeUInt32LE(value, 0); break; default: diff --git a/packages/td-tools/src/td-tools.ts b/packages/td-tools/src/td-tools.ts index a76ca469c..9ffefa49e 100644 --- a/packages/td-tools/src/td-tools.ts +++ b/packages/td-tools/src/td-tools.ts @@ -20,12 +20,11 @@ export * from "./thing-description"; export * from "./td-parser"; export * from "./td-helpers"; export * from "./thing-model-helpers"; -type DeepPartial = - T extends Record - ? { - [P in keyof T]?: T[P] extends Array ? Array> : DeepPartial; - } - : T; +type DeepPartial = T extends Record + ? { + [P in keyof T]?: T[P] extends Array ? Array> : DeepPartial; + } + : T; /** * @deprecated Will be removed in the future. Please use '@node-wot/core' package instead.