From 2e8866351c78a5de8f03caf53a6bf0baaf979795 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sat, 27 Jul 2024 11:56:58 +0900 Subject: [PATCH] eliminate misskey-js lint warns --- packages/misskey-js/src/index.ts | 2 +- packages/misskey-js/src/streaming.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/misskey-js/src/index.ts b/packages/misskey-js/src/index.ts index 9b5828fcab..e2d6bc1a1f 100644 --- a/packages/misskey-js/src/index.ts +++ b/packages/misskey-js/src/index.ts @@ -1,8 +1,8 @@ import { type Endpoints } from './api.types.js'; import Stream, { Connection } from './streaming.js'; -import type { StreamEvents, IStream, IChannelConnection } from './streaming.js'; import { type Channels } from './streaming.types.js'; import { type Acct } from './acct.js'; +import type { StreamEvents, IStream, IChannelConnection } from './streaming.js'; import * as consts from './consts.js'; export type { diff --git a/packages/misskey-js/src/streaming.ts b/packages/misskey-js/src/streaming.ts index 07e5b0cac0..9754b58df8 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: any): void; - send(typeOrPayload: Record | any[]): void; - send(typeOrPayload: string | Record | any[], payload?: any): 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; @@ -293,7 +293,7 @@ class Pool { } } -export interface IChannelConnection = any> extends EventEmitter { +export interface IChannelConnection = AnyOf> extends EventEmitter { id: string; name?: string; inCount: number;