mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-05-23 16:26:05 +00:00
Merge pull request #81 from harochen75/main
fix[protocol] typescript compatible
This commit is contained in:
@@ -205,7 +205,7 @@ public abstract class GenerateTsUtils {
|
||||
var field = fields[i];
|
||||
var fieldRegistration = fieldRegistrations[i];
|
||||
if (field.isAnnotationPresent(Compatible.class)) {
|
||||
tsBuilder.append(TAB + TAB).append("if (buffer.compatibleRead(beforeReadIndex, length)) {").append(LS);
|
||||
tsBuilder.append(TAB + TAB).append("if (!buffer.compatibleRead(beforeReadIndex, length)) {").append(LS);
|
||||
var compatibleReadObject = tsSerializer(fieldRegistration.serializer()).readObject(tsBuilder, 3, field, fieldRegistration);
|
||||
tsBuilder.append(TAB + TAB+ TAB).append(StringUtils.format("packet.{} = {};", field.getName(), compatibleReadObject)).append(LS);
|
||||
tsBuilder.append(TAB + TAB).append("}").append(LS);
|
||||
|
||||
Reference in New Issue
Block a user