This commit is contained in:
kakkokari-gtyih 2024-07-27 12:01:36 +09:00
parent 2e8866351c
commit 68c9662648
3 changed files with 10 additions and 9 deletions

View File

@ -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<Channel extends AnyOf<Channels> = any> extends EventEmitter<Channel['events']> {
export interface IChannelConnection<Channel extends AnyOf<Channels> = AnyOf<Channels>> extends EventEmitter<Channel['events']> {
// (undocumented)
channel: string;
// (undocumented)
@ -2318,11 +2318,11 @@ export interface IStream extends EventEmitter<StreamEvents> {
// (undocumented)
send(typeOrPayload: string): void;
// (undocumented)
send(typeOrPayload: string, payload: any): void;
send(typeOrPayload: string, payload: unknown): void;
// (undocumented)
send(typeOrPayload: Record<string, any> | any[]): void;
send(typeOrPayload: Record<string, unknown> | unknown[]): void;
// (undocumented)
send(typeOrPayload: string | Record<string, any> | any[], payload?: any): void;
send(typeOrPayload: string | Record<string, unknown> | unknown[], payload?: unknown): void;
// (undocumented)
state: 'initializing' | 'reconnecting' | 'connected';
// (undocumented)

View File

@ -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];

View File

@ -29,10 +29,10 @@ export interface IStream extends EventEmitter<StreamEvents> {
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<string, unknown> | unknown[]): void
send(typeOrPayload: string | Record<string, unknown> | unknown[], payload?: unknown): void {
send(typeOrPayload: string): void;
send(typeOrPayload: string, payload: unknown): void;
send(typeOrPayload: Record<string, unknown> | unknown[]): void;
send(typeOrPayload: string | Record<string, unknown> | unknown[], payload?: unknown): void;
ping(): void;
heartbeat(): void;
close(): void;