mirror of
https://github.com/vector-im/element-web.git
synced 2026-07-04 22:38:45 +00:00
improve typing in the idb worker
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user