From 3eca178df5b08ad6d6b23fa31e5a144ab9f9ba08 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Sat, 6 Mar 2021 02:22:56 +0100 Subject: [PATCH] Add type to ports --- src/ext/lib/comms/CommsServer.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ext/lib/comms/CommsServer.ts b/src/ext/lib/comms/CommsServer.ts index cbda452..9d5344a 100644 --- a/src/ext/lib/comms/CommsServer.ts +++ b/src/ext/lib/comms/CommsServer.ts @@ -12,10 +12,11 @@ class CommsServer { settings: Settings; - // we could have a bit more defined type here, but then - // typescript be like {[x: string]; any} dOeSnT hAvE sYmBoL.ItErAToR - // and I'm too lazy to handle this properly - ports: any = []; + ports: { + [frame: string] : { + [port: string]: any + } + }[] = []; popupPort: any; commands: {[x: string]: ((a: any, b: any) => void | Promise)[]}