UNPKG

969 BTypeScriptView Raw
1/**
2 * Handles the global registration of custom MsgPackR extensions
3 * required for the default RPC communication. MsgPackR extensions
4 * are installed globally on both ends of the communication channel.
5 * (frontend-backend, pluginExt-pluginMain).
6 * Is implemented as singleton as it is also used in plugin child processes which have no access to inversify.
7 */
8export declare class MsgPackExtensionManager {
9 private static readonly INSTANCE;
10 static getInstance(): MsgPackExtensionManager;
11 private extensions;
12 private constructor();
13 registerExtensions(...extensions: MsgPackExtension[]): void;
14 getExtension(tag: number): MsgPackExtension | undefined;
15}
16export interface MsgPackExtension {
17 class: Function;
18 tag: number;
19 serialize(instance: unknown): unknown;
20 deserialize(serialized: any): unknown;
21}
22export declare type Constructor<T> = new (...params: unknown[]) => T;
23//# sourceMappingURL=msg-pack-extension-manager.d.ts.map
\No newline at end of file