From 93d7a677d8ca6f5ad9ba6b1fcf387a3c5b5af954 Mon Sep 17 00:00:00 2001 From: Lawrence Forooghian Date: Mon, 21 Aug 2023 10:05:45 -0300 Subject: [PATCH] Move MsgPack interface into its own file Preparation for #1375 (making MessagePack functionality tree-shakable). --- src/common/types/IPlatformConfig.d.ts | 5 +---- src/common/types/msgpack.ts | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 src/common/types/msgpack.ts diff --git a/src/common/types/IPlatformConfig.d.ts b/src/common/types/IPlatformConfig.d.ts index ecb0e4868d..4a83e20a39 100644 --- a/src/common/types/IPlatformConfig.d.ts +++ b/src/common/types/IPlatformConfig.d.ts @@ -1,7 +1,4 @@ -interface MsgPack { - encode(value: any, sparse?: boolean): Buffer | ArrayBuffer | undefined; - decode(buffer: Buffer): any; -} +import { MsgPack } from './msgpack'; export interface IPlatformConfig { agent: string; diff --git a/src/common/types/msgpack.ts b/src/common/types/msgpack.ts new file mode 100644 index 0000000000..0667def08a --- /dev/null +++ b/src/common/types/msgpack.ts @@ -0,0 +1,4 @@ +export interface MsgPack { + encode(value: any, sparse?: boolean): Buffer | ArrayBuffer | undefined; + decode(buffer: Buffer): any; +}