mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-28 20:40:01 +00:00
[TS/JS] Updates the grpc (#6654)
* Updates go lang support to allow other languages to communicate with it * Update js grpc lib to use grpc-js Reformat code
This commit is contained in:
@@ -3,13 +3,13 @@ import * as flatbuffers from 'flatbuffers';
|
||||
import { Stat as MyGame_Example_Stat } from './my-game/example/stat';
|
||||
import { Monster as MyGame_Example_Monster } from './my-game/example/monster';
|
||||
|
||||
var grpc = require('grpc');
|
||||
var grpc = require('@grpc/grpc-js');
|
||||
|
||||
function serialize_MyGame_Example_Stat(buffer_args) {
|
||||
if (!(buffer_args instanceof MyGame_Example_Stat)) {
|
||||
throw new Error('Expected argument of type Stat');
|
||||
}
|
||||
return buffer_args.serialize();
|
||||
return Buffer.from(buffer_args.serialize());
|
||||
}
|
||||
|
||||
function deserialize_MyGame_Example_Stat(buffer) {
|
||||
@@ -21,7 +21,7 @@ function serialize_MyGame_Example_Monster(buffer_args) {
|
||||
if (!(buffer_args instanceof MyGame_Example_Monster)) {
|
||||
throw new Error('Expected argument of type Monster');
|
||||
}
|
||||
return buffer_args.serialize();
|
||||
return Buffer.from(buffer_args.serialize());
|
||||
}
|
||||
|
||||
function deserialize_MyGame_Example_Monster(buffer) {
|
||||
|
||||
Reference in New Issue
Block a user