Configure Long before requiring compiled protobuf

This commit is contained in:
Fedor Indutny 2022-03-24 10:05:48 -07:00 committed by GitHub
parent 6d97976179
commit e8651afa0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 9 deletions

10
ts/protobuf/wrap.ts Normal file
View file

@ -0,0 +1,10 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import * as protobuf from 'protobufjs/minimal';
import Long from 'long';
protobuf.util.Long = Long;
protobuf.configure();
export default protobuf;