mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 18:46:19 +08:00
fix(infra): export op module (#8769)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
"./storage": "./src/storage/index.ts",
|
||||
"./utils": "./src/utils/index.ts",
|
||||
"./app-config-storage": "./src/app-config-storage.ts",
|
||||
"./op": "./src/op/index.ts",
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -124,10 +124,10 @@ const client = new OpClient(channel);
|
||||
client.listen();
|
||||
```
|
||||
|
||||
### MessagePort
|
||||
### MessageChannel
|
||||
|
||||
```ts
|
||||
const { port1, port2 } = new MessagePort();
|
||||
const { port1, port2 } = new MessageChannel();
|
||||
|
||||
const client = new OpClient(port1);
|
||||
const consumer = new OpConsumer(port2);
|
||||
|
||||
Reference in New Issue
Block a user