Migrating front protobuf encode/decode to ts-proto lib
The ts-proto lib has the huge advantage of producing code the "Typescript" way and not the "Java" way. In particular, for "oneof" types in protobuf, it is generating "ADT" that can be used to check if we forgot or not to deal with a type.
This commit is contained in:
@@ -280,7 +280,7 @@ class ConnectionManager {
|
||||
reject(error);
|
||||
});
|
||||
|
||||
connection.onConnectingError((event: CloseEvent) => {
|
||||
connection.connectionErrorStream.subscribe((event: CloseEvent) => {
|
||||
console.log("An error occurred while connecting to socket server. Retrying");
|
||||
reject(
|
||||
new Error(
|
||||
@@ -292,7 +292,7 @@ class ConnectionManager {
|
||||
);
|
||||
});
|
||||
|
||||
connection.onConnect((connect: OnConnectInterface) => {
|
||||
connection.roomJoinedMessageStream.subscribe((connect: OnConnectInterface) => {
|
||||
resolve(connect);
|
||||
});
|
||||
}).catch((err) => {
|
||||
|
||||
Reference in New Issue
Block a user