Skip to content

Commit 03178fb

Browse files
committed
fix: lint error
1 parent 1f87975 commit 03178fb

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/persist-worker-thread.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import * as Y from 'yjs'
22
import * as logging from 'lib0/logging'
3-
import { Worker, isMainThread, parentPort, workerData } from 'worker_threads'
4-
import path from 'path'
3+
import { isMainThread, parentPort } from 'worker_threads'
54

65
export class PersistWorkerThread {
76
/**
@@ -13,7 +12,7 @@ export class PersistWorkerThread {
1312
/**
1413
* @param {import('./storage.js').AbstractStorage} store
1514
*/
16-
constructor(store) {
15+
constructor (store) {
1716
if (isMainThread) {
1817
this.log('persist worker cannot run on main thread')
1918
return
@@ -37,7 +36,7 @@ export class PersistWorkerThread {
3736
/**
3837
* @param {import('./storage.js').AbstractStorage} store
3938
*/
40-
export function createPersistWorkerThread(store) {
39+
export function createPersistWorkerThread (store) {
4140
if (isMainThread) throw new Error('cannot create persist worker in main thread')
4241
return new PersistWorkerThread(store)
4342
}

src/y-socket-io/y-socket-io.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -487,9 +487,9 @@ export class YSocketIO {
487487
if (!doc) return
488488
if (this.client.persistWorker) {
489489
/** @type {Promise<void>} */
490-
const promise = new Promise((res) => {
490+
const promise = new Promise((resolve) => {
491491
assert(this.client?.persistWorker)
492-
this.awaitingPersistMap.set(namespace, res)
492+
this.awaitingPersistMap.set(namespace, resolve)
493493

494494
const docState = Y.encodeStateAsUpdateV2(doc)
495495
const buf = new Uint8Array(new SharedArrayBuffer(docState.length))

0 commit comments

Comments
 (0)