From 68c9662648068187005b2ee50105819873cfe903 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sat, 27 Jul 2024 12:01:36 +0900 Subject: [PATCH] fix --- packages/misskey-js/etc/misskey-js.api.md | 8 ++++---- packages/misskey-js/src/consts.ts | 3 ++- packages/misskey-js/src/streaming.ts | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index f891cfe95b..b5b2f9405a 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -2119,7 +2119,7 @@ type IAuthorizedAppsResponse = operations['i___authorized-apps']['responses']['2 type IChangePasswordRequest = operations['i___change-password']['requestBody']['content']['application/json']; // @public (undocumented) -export interface IChannelConnection = any> extends EventEmitter { +export interface IChannelConnection = AnyOf> extends EventEmitter { // (undocumented) channel: string; // (undocumented) @@ -2318,11 +2318,11 @@ export interface IStream extends EventEmitter { // (undocumented) send(typeOrPayload: string): void; // (undocumented) - send(typeOrPayload: string, payload: any): void; + send(typeOrPayload: string, payload: unknown): void; // (undocumented) - send(typeOrPayload: Record | any[]): void; + send(typeOrPayload: Record | unknown[]): void; // (undocumented) - send(typeOrPayload: string | Record | any[], payload?: any): void; + send(typeOrPayload: string | Record | unknown[], payload?: unknown): void; // (undocumented) state: 'initializing' | 'reconnecting' | 'connected'; // (undocumented) diff --git a/packages/misskey-js/src/consts.ts b/packages/misskey-js/src/consts.ts index b509d3280c..041bbc79ca 100644 --- a/packages/misskey-js/src/consts.ts +++ b/packages/misskey-js/src/consts.ts @@ -5,6 +5,7 @@ import type { EmojiDetailed, InviteCode, MetaDetailed, Note, + ReversiGameDetailed, Role, SystemWebhook, UserLite, } from './autogen/models.js'; @@ -153,7 +154,7 @@ export const reversiUpdateKeys = [ 'canPutEverywhere', 'loopedBoard', 'timeLimitForEachTurn', -] as const; +] as const satisfies (keyof ReversiGameDetailed)[]; export type ReversiUpdateKey = typeof reversiUpdateKeys[number]; diff --git a/packages/misskey-js/src/streaming.ts b/packages/misskey-js/src/streaming.ts index 9754b58df8..ffb46c77f6 100644 --- a/packages/misskey-js/src/streaming.ts +++ b/packages/misskey-js/src/streaming.ts @@ -29,10 +29,10 @@ export interface IStream extends EventEmitter { removeSharedConnection(connection: SharedConnection): void; removeSharedConnectionPool(pool: Pool): void; disconnectToChannel(connection: NonSharedConnection): void; - send(typeOrPayload: string): void - send(typeOrPayload: string, payload: unknown): void - send(typeOrPayload: Record | unknown[]): void - send(typeOrPayload: string | Record | unknown[], payload?: unknown): void { + send(typeOrPayload: string): void; + send(typeOrPayload: string, payload: unknown): void; + send(typeOrPayload: Record | unknown[]): void; + send(typeOrPayload: string | Record | unknown[], payload?: unknown): void; ping(): void; heartbeat(): void; close(): void;