From 0b9f6da9a84ce4dad69c68d70725ab92cb7a0744 Mon Sep 17 00:00:00 2001 From: godotg Date: Wed, 27 Sep 2023 00:11:25 +0800 Subject: [PATCH] feat[ts]: compatible typescript inside class --- protocol/src/main/resources/typescript/buffer/Longbits.ts | 2 +- .../src/test/java/com/zfoo/protocol/packet/NormalObject.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/protocol/src/main/resources/typescript/buffer/Longbits.ts b/protocol/src/main/resources/typescript/buffer/Longbits.ts index a538cace5..3bb8a20d7 100644 --- a/protocol/src/main/resources/typescript/buffer/Longbits.ts +++ b/protocol/src/main/resources/typescript/buffer/Longbits.ts @@ -43,7 +43,7 @@ class Longbits { /** * Converts this long bits to a long. */ - toLong(unsigned): Long { + toLong(unsigned: boolean): Long { return new Long(this.lo | 0, this.hi | 0, Boolean(unsigned)); }; diff --git a/protocol/src/test/java/com/zfoo/protocol/packet/NormalObject.java b/protocol/src/test/java/com/zfoo/protocol/packet/NormalObject.java index ffe088337..81d84ac83 100644 --- a/protocol/src/test/java/com/zfoo/protocol/packet/NormalObject.java +++ b/protocol/src/test/java/com/zfoo/protocol/packet/NormalObject.java @@ -60,6 +60,8 @@ public class NormalObject { // @Compatible(1) // public int outCompatibleValue; +// @Compatible(2) +// public int outCompatibleValue2; public byte getA() { return a;