Skip to content

Commit c0e69ce

Browse files
committed
[修改]1. 修改TS的协议导出
1 parent 8074aa6 commit c0e69ce

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

ProtoExport/ProtoBuffTypeScriptHelper.cs

+2-5
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,9 @@ public void Run(MessageInfoList messageInfoList, string outputPath, string names
7373
sb.Append($"\t\t\tProtoMessageHelper.registerRespMessage('{messageInfoList.ModuleName}.{operationCodeInfo.Name}', {(messageInfoList.Module << 16) + operationCodeInfo.Opcode});\n");
7474
}
7575

76-
sb.Append($"\t\t{'}'}\n");
76+
sb.Append($"\t\t{'}'}\n\n");
7777

78-
79-
sb.Append($"\t\tpublic get PackageName(): string{'{'}\n");
80-
sb.Append($"\t\t\treturn '{messageInfoList.ModuleName}.{operationCodeInfo.Name}';\n");
81-
sb.Append($"\t\t{'}'}\n");
78+
sb.Append($"\t\tpublic readonly PackageName: string = '{messageInfoList.ModuleName}.{operationCodeInfo.Name}';\n");
8279

8380
sb.Append("\n");
8481
}

0 commit comments

Comments
 (0)