编译小问题

This commit is contained in:
Xu Chang 2024-05-29 14:43:51 +08:00
parent 71e2444c58
commit f21d15baaa
5 changed files with 6 additions and 9 deletions

View File

@ -42,7 +42,7 @@ async function execWatcher(store, watcher, context) {
const data = typeof actionData === 'function' ? await actionData() : actionData; // 这里有个奇怪的编译错误,不理解 by Xc
const result = await store.operate(entity, {
id: await generateNewIdAsync(),
action,
action: action,
data,
filter: filter2
}, context, {

View File

@ -179,10 +179,4 @@ export class SubScriber extends Feature {
return this.socket.id;
}
}
closeSocket() {
if (this.socket) {
this.socket.close();
}
}
}

View File

@ -45,7 +45,7 @@ async function execWatcher(store, watcher, context) {
const data = typeof actionData === 'function' ? await actionData() : actionData; // 这里有个奇怪的编译错误,不理解 by Xc
const result = await store.operate(entity, {
id: await (0, uuid_1.generateNewIdAsync)(),
action,
action: action,
data,
filter: filter2
}, context, {

View File

@ -137,6 +137,9 @@ class SubScriber extends Feature_1.Feature {
if (this.socketState === 'unconnected') {
return this.connect();
}
else if (this.socketState === 'connecting') {
return this.connect();
}
else if (this.socketState === 'connected' && newEvents.length > 0) {
return new Promise((resolve, reject) => {
this.socket.emit('sub', newEvents, (result) => {

View File

@ -70,7 +70,7 @@ async function execWatcher<ED extends EntityDict & BaseEntityDict, Cxt extends A
const data = typeof actionData === 'function' ? await (actionData as Function)() : actionData; // 这里有个奇怪的编译错误,不理解 by Xc
const result = await store.operate(entity, {
id: await generateNewIdAsync(),
action,
action: action as string,
data,
filter: filter2
}, context, {