improve typing in the idb worker

pull/21833/head
Michael Telatynski 2021-07-14 17:53:42 +01:00
parent 4084a11847
commit 0e38eee080
1 changed files with 4 additions and 2 deletions

View File

@ -16,6 +16,8 @@ limitations under the License.
import { IndexedDBStoreWorker } from "matrix-js-sdk/src/indexeddb-worker";
const remoteWorker = new IndexedDBStoreWorker(postMessage as InstanceType<typeof Worker>["postMessage"]);
const ctx: Worker = self as any;
global.onmessage = remoteWorker.onMessage;
const remoteWorker = new IndexedDBStoreWorker(ctx.postMessage);
ctx.onmessage = remoteWorker.onMessage;