Prune
This commit is contained in:
parent
30fe91efb9
commit
feb8814ac1
1 changed files with 1 additions and 16 deletions
|
@ -1,19 +1,6 @@
|
|||
import { haveWindow } from "@/next/env";
|
||||
import { ComlinkWorker } from "@/next/worker/comlink-worker";
|
||||
import { Remote } from "comlink";
|
||||
import { DedicatedConvertWorker } from "worker/convert.worker";
|
||||
|
||||
class ComlinkConvertWorker {
|
||||
private comlinkWorkerInstance: Remote<DedicatedConvertWorker>;
|
||||
|
||||
async getInstance() {
|
||||
if (!this.comlinkWorkerInstance) {
|
||||
this.comlinkWorkerInstance =
|
||||
await getDedicatedConvertWorker().remote;
|
||||
}
|
||||
return this.comlinkWorkerInstance;
|
||||
}
|
||||
}
|
||||
import { type DedicatedConvertWorker } from "worker/convert.worker";
|
||||
|
||||
export const getDedicatedConvertWorker = () => {
|
||||
if (haveWindow()) {
|
||||
|
@ -26,5 +13,3 @@ export const getDedicatedConvertWorker = () => {
|
|||
return cryptoComlinkWorker;
|
||||
}
|
||||
};
|
||||
|
||||
export default new ComlinkConvertWorker();
|
||||
|
|
Loading…
Add table
Reference in a new issue