[Re] refactor(misskey-js): 警告をすべて解決 (#14277)

* chore(misskey-js): Unchanged files with check annotationsで紛らわしい部分の警告を抑制 ロジック面は後で直す

* dummy change to see if the feature do not report them (to be reverted after the check)

* refactor: 型合わせ

* refactor: fix warnings from c22dd6358b

* lint

* 型合わせ

* キャスト

* pnpm build-misskey-js-with-types

* Revert "dummy change to see if the feature do not report them (to be reverted after the check)"

This reverts commit 67072e3ca6.

* eliminate reversiGame any

* move reversiGame types

* lint

* Update packages/misskey-js/src/streaming.ts

Co-authored-by: Sayamame-beans <61457993+Sayamame-beans@users.noreply.github.com>

* Update acct.ts

* run api extractor

* re-run api extractor

---------

Co-authored-by: Kisaragi Marine <kisaragi.effective@gmail.com>
Co-authored-by: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com>
This commit is contained in:
Sayamame-beans
2024-07-25 16:40:14 +09:00
committed by GitHub
parent befa8e4a7f
commit 3d8eda14a2
9 changed files with 118 additions and 73 deletions

View File

@@ -14,6 +14,7 @@ export type APIError = {
code: string;
message: string;
kind: 'client' | 'server';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
info: Record<string, any>;
};
@@ -29,6 +30,7 @@ export type FetchLike = (input: string, init?: {
headers: { [key in string]: string }
}) => Promise<{
status: number;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
json(): Promise<any>;
}>;
@@ -49,6 +51,7 @@ export class APIClient {
this.fetch = opts.fetch ?? ((...args) => fetch(...args));
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
private assertIsRecord<T>(obj: T): obj is T & Record<string, any> {
return obj !== null && typeof obj === 'object' && !Array.isArray(obj);
}