mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-22 06:44:43 +08:00
Simple serialization entities fixes and tests
This commit is contained in:
@@ -17,16 +17,18 @@ export default class Integer64Entity extends IEntity {
|
||||
return Parsernostrum.numberBigInteger.map(v => new this(v))
|
||||
}
|
||||
|
||||
/** @param {BigInt | Number} value */
|
||||
constructor(value = 0) {
|
||||
if (value.constructor !== Object) {
|
||||
value = {
|
||||
// @ts-expect-error
|
||||
value: value,
|
||||
/** @param {BigInt | Number | Object} values */
|
||||
constructor(values = 0) {
|
||||
if (values.constructor !== Object) {
|
||||
values = {
|
||||
value: values,
|
||||
}
|
||||
}
|
||||
super(value)
|
||||
/** @type {BigInt | Number} */ this.value
|
||||
if (values.value === -0) {
|
||||
values.value = 0n
|
||||
}
|
||||
super(values)
|
||||
/** @type {BigInt} */ this.value
|
||||
}
|
||||
|
||||
valueOf() {
|
||||
|
||||
Reference in New Issue
Block a user