fix(misskey-js): WebSocketの型定義をReconnectingWebsocketに依存するように (#14850)

* fix(misskey-js): WebSocketの型定義をReconnectingWebsocketに依存するように

* Update Changelog

* run api extractor

* fix

* fix
This commit is contained in:
かっこかり
2024-10-28 11:43:05 +09:00
committed by GitHub
parent a6a1e3d733
commit ec4358d1e8
4 changed files with 6 additions and 4 deletions

View File

@@ -232,7 +232,6 @@ export async function isFired<C extends keyof Misskey.Channels, T extends keyof
params?: Misskey.Channels[C]['params'],
): Promise<boolean> {
return new Promise<boolean>(async (resolve, reject) => {
// @ts-expect-error TODO: why?
const stream = new Misskey.Stream(`wss://${host}`, { token: user.i }, { WebSocket });
const connection = stream.useChannel(channel, params);
connection.on(type as any, ((msg: any) => {
@@ -266,7 +265,6 @@ export async function isNoteUpdatedEventFired(
cond: (msg: Parameters<Misskey.StreamEvents['noteUpdated']>[0]) => boolean,
): Promise<boolean> {
return new Promise<boolean>(async (resolve, reject) => {
// @ts-expect-error TODO: why?
const stream = new Misskey.Stream(`wss://${host}`, { token: user.i }, { WebSocket });
stream.send('s', { id: noteId });
stream.on('noteUpdated', msg => {