mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-25 15:40:06 +03:00
stash
This commit is contained in:
parent
ebf3625311
commit
8926238b35
|
@ -167,8 +167,7 @@ function handleConnection() {
|
|||
authState: socket.authState,
|
||||
socketState: socket.state,
|
||||
},
|
||||
// TODO Fix
|
||||
// @ts-expect-error Because
|
||||
// @ts-expect-error Is this legitimate?
|
||||
error: data.authError,
|
||||
});
|
||||
if (socket.authState !== actions.AUTHENTICATED) {
|
||||
|
|
|
@ -90,11 +90,7 @@ if (argv.injectserver) {
|
|||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
server(argv).then(async function (r) {
|
||||
if (argv.open && argv.open !== 'false') {
|
||||
await r
|
||||
.listener('ready')
|
||||
.once()
|
||||
.then(async () => {
|
||||
await openApp(argv.open as string, options);
|
||||
});
|
||||
await r.listener('ready').once();
|
||||
await openApp(argv.open as string, options);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -17,7 +17,7 @@ export interface ExtendedOptions extends Options {
|
|||
|
||||
export default function (argv: { [arg: string]: any }): Promise<{
|
||||
portAlreadyUsed?: boolean;
|
||||
listener: (eventName: 'ready') => { once(): Promise<unknown> };
|
||||
listener: (eventName: 'ready') => { once(): Promise<void> };
|
||||
}> {
|
||||
const options = Object.assign(getOptions(argv), {
|
||||
allowClientPublish: false,
|
||||
|
@ -135,19 +135,18 @@ export default function (argv: { [arg: string]: any }): Promise<{
|
|||
for await (const data of socket.receiver('disconnect')) {
|
||||
const channel = agServer.exchange.channel('sc-' + socket.id);
|
||||
channel.unsubscribe();
|
||||
// TODO
|
||||
// void agServer.exchange.transmitPublish(channelToEmit, {
|
||||
// id: socket.id,
|
||||
// type: 'DISCONNECTED',
|
||||
// });
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
void agServer.exchange.transmitPublish(channelToEmit!, {
|
||||
id: socket.id,
|
||||
type: 'DISCONNECTED',
|
||||
});
|
||||
}
|
||||
})();
|
||||
}
|
||||
})();
|
||||
|
||||
httpServer.listen(options.port);
|
||||
// TODO Fix
|
||||
// @ts-expect-error Because
|
||||
// @ts-expect-error Shouldn't there be a 'ready' event?
|
||||
resolve(agServer);
|
||||
}
|
||||
/* eslint-enable no-console */
|
||||
|
|
Loading…
Reference in New Issue
Block a user