diff --git a/protocol/src/main/resources/typescript/buffer/Long.ts b/protocol/src/main/resources/typescript/buffer/Long.ts index 0276f32e..dac9a00b 100644 --- a/protocol/src/main/resources/typescript/buffer/Long.ts +++ b/protocol/src/main/resources/typescript/buffer/Long.ts @@ -691,11 +691,8 @@ export class Long { if ((numBits &= 63) === 0) { return this; } else if (numBits < 32) { - return Long.fromBits( - this.low << numBits, - (this.high << numBits) | (this.low >>> (32 - numBits)), - this.unsigned - ); + const lowNum: number = this.low << numBits; + return Long.fromBits(lowNum, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned); } else { return Long.fromBits(0, this.low << (numBits - 32), this.unsigned); } diff --git a/protocol/src/main/resources/typescript/buffer/Longbits.ts b/protocol/src/main/resources/typescript/buffer/Longbits.ts index a3115e58..a538cace 100644 --- a/protocol/src/main/resources/typescript/buffer/Longbits.ts +++ b/protocol/src/main/resources/typescript/buffer/Longbits.ts @@ -50,12 +50,12 @@ class Longbits { /** * Constructs new long bits from the specified number. */ - static from(value) { + static from(value: any) { if (typeof value === 'number') { - return Longbits.fromNumber(value); + return Longbits.fromNumber(value as number); } if (typeof value === 'string' || value instanceof String) { - value = Long.fromString(value); + value = Long.fromString(value as string); } return value.low || value.high ? new Longbits(value.low >>> 0, value.high >>> 0) : zero; } @@ -63,7 +63,7 @@ class Longbits { /** * Constructs new long bits from the specified number. */ - static fromNumber(value): Longbits { + static fromNumber(value: number): Longbits { if (value === 0) { return zero; }