|
|
@ -9,6 +9,12 @@ import ByteBuffer from 'bytebuffer';
|
|
|
|
export function convertToTS(object: any): any {
|
|
|
|
export function convertToTS(object: any): any {
|
|
|
|
// No idea why js `ByteBuffer` and ts `ByteBuffer` differ ...
|
|
|
|
// No idea why js `ByteBuffer` and ts `ByteBuffer` differ ...
|
|
|
|
if (
|
|
|
|
if (
|
|
|
|
|
|
|
|
object &&
|
|
|
|
|
|
|
|
object.constructor &&
|
|
|
|
|
|
|
|
object.constructor.name === 'Uint8Array'
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
return object;
|
|
|
|
|
|
|
|
} else if (
|
|
|
|
object &&
|
|
|
|
object &&
|
|
|
|
object.constructor &&
|
|
|
|
object.constructor &&
|
|
|
|
object.constructor.name === 'ByteBuffer'
|
|
|
|
object.constructor.name === 'ByteBuffer'
|
|
|
|