编译小问题
This commit is contained in:
parent
71e2444c58
commit
f21d15baaa
|
|
@ -42,7 +42,7 @@ async function execWatcher(store, watcher, context) {
|
||||||
const data = typeof actionData === 'function' ? await actionData() : actionData; // 这里有个奇怪的编译错误,不理解 by Xc
|
const data = typeof actionData === 'function' ? await actionData() : actionData; // 这里有个奇怪的编译错误,不理解 by Xc
|
||||||
const result = await store.operate(entity, {
|
const result = await store.operate(entity, {
|
||||||
id: await generateNewIdAsync(),
|
id: await generateNewIdAsync(),
|
||||||
action,
|
action: action,
|
||||||
data,
|
data,
|
||||||
filter: filter2
|
filter: filter2
|
||||||
}, context, {
|
}, context, {
|
||||||
|
|
|
||||||
|
|
@ -179,10 +179,4 @@ export class SubScriber extends Feature {
|
||||||
return this.socket.id;
|
return this.socket.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
closeSocket() {
|
|
||||||
if (this.socket) {
|
|
||||||
this.socket.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ async function execWatcher(store, watcher, context) {
|
||||||
const data = typeof actionData === 'function' ? await actionData() : actionData; // 这里有个奇怪的编译错误,不理解 by Xc
|
const data = typeof actionData === 'function' ? await actionData() : actionData; // 这里有个奇怪的编译错误,不理解 by Xc
|
||||||
const result = await store.operate(entity, {
|
const result = await store.operate(entity, {
|
||||||
id: await (0, uuid_1.generateNewIdAsync)(),
|
id: await (0, uuid_1.generateNewIdAsync)(),
|
||||||
action,
|
action: action,
|
||||||
data,
|
data,
|
||||||
filter: filter2
|
filter: filter2
|
||||||
}, context, {
|
}, context, {
|
||||||
|
|
|
||||||
|
|
@ -137,6 +137,9 @@ class SubScriber extends Feature_1.Feature {
|
||||||
if (this.socketState === 'unconnected') {
|
if (this.socketState === 'unconnected') {
|
||||||
return this.connect();
|
return this.connect();
|
||||||
}
|
}
|
||||||
|
else if (this.socketState === 'connecting') {
|
||||||
|
return this.connect();
|
||||||
|
}
|
||||||
else if (this.socketState === 'connected' && newEvents.length > 0) {
|
else if (this.socketState === 'connected' && newEvents.length > 0) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.socket.emit('sub', newEvents, (result) => {
|
this.socket.emit('sub', newEvents, (result) => {
|
||||||
|
|
|
||||||
|
|
@ -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 data = typeof actionData === 'function' ? await (actionData as Function)() : actionData; // 这里有个奇怪的编译错误,不理解 by Xc
|
||||||
const result = await store.operate(entity, {
|
const result = await store.operate(entity, {
|
||||||
id: await generateNewIdAsync(),
|
id: await generateNewIdAsync(),
|
||||||
action,
|
action: action as string,
|
||||||
data,
|
data,
|
||||||
filter: filter2
|
filter: filter2
|
||||||
}, context, {
|
}, context, {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue