@manahippo/move-to-ts
Advanced tools
Comparing version 0.0.15 to 0.0.16
@@ -10,3 +10,3 @@ import bigInt from "big-integer"; | ||
checkBounds(): void; | ||
make(value: bigInt.BigInteger): UnsignedInt<IntInterface<unknown>>; | ||
make(value: bigInt.BigInteger): UnsignedInt<T>; | ||
toPayloadArg(): string; | ||
@@ -22,4 +22,4 @@ $set(val: T): void; | ||
mod(other: T): T; | ||
shl(other: T): T; | ||
shr(other: T): T; | ||
shl(other: UnsignedInt<any>): UnsignedInt<T>; | ||
shr(other: UnsignedInt<any>): UnsignedInt<T>; | ||
lt(other: T): boolean; | ||
@@ -26,0 +26,0 @@ le(other: T): boolean; |
@@ -53,7 +53,7 @@ "use strict"; | ||
// FIXME: need to match this with move's implementation | ||
return other.make(this.value.shiftLeft(other.value)); | ||
return this.make(this.value.shiftLeft(other.value)); | ||
} | ||
shr(other) { | ||
// FIXME: need to match this with move's implementation | ||
return other.make(this.value.shiftRight(other.value)); | ||
return this.make(this.value.shiftRight(other.value)); | ||
} | ||
@@ -60,0 +60,0 @@ lt(other) { |
{ | ||
"name": "@manahippo/move-to-ts", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -17,3 +17,3 @@ import bigInt from "big-integer"; | ||
make(value: bigInt.BigInteger) { | ||
return new UnsignedInt(value); | ||
return new UnsignedInt<T>(value); | ||
} | ||
@@ -56,9 +56,9 @@ | ||
} | ||
shl(other: T): T { | ||
shl(other: UnsignedInt<any>): UnsignedInt<T> { | ||
// FIXME: need to match this with move's implementation | ||
return other.make(this.value.shiftLeft(other.value)); | ||
return this.make(this.value.shiftLeft(other.value)); | ||
} | ||
shr(other: T): T { | ||
shr(other: UnsignedInt<any>): UnsignedInt<T> { | ||
// FIXME: need to match this with move's implementation | ||
return other.make(this.value.shiftRight(other.value)); | ||
return this.make(this.value.shiftRight(other.value)); | ||
} | ||
@@ -65,0 +65,0 @@ lt(other: T): boolean { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
292523