merge: all upstream changes

This commit is contained in:
Mar0xy 2023-10-13 19:01:17 +02:00
commit f8f128b347
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
170 changed files with 4490 additions and 2218 deletions

View file

@ -14,9 +14,9 @@
"misskey-js": "workspace:*"
},
"devDependencies": {
"@typescript-eslint/parser": "6.7.3",
"@typescript-eslint/parser": "6.7.5",
"@typescript/lib-webworker": "npm:@types/serviceworker@0.0.67",
"eslint": "8.50.0",
"eslint": "8.51.0",
"eslint-plugin-import": "2.28.1",
"typescript": "5.2.2"
},

View file

@ -15,7 +15,7 @@ import { getUrlWithLoginId } from '@/scripts/login-id.js';
export const cli = new Misskey.api.APIClient({ origin, fetch: (...args): Promise<Response> => fetch(...args) });
export async function api<E extends keyof Misskey.Endpoints, O extends Misskey.Endpoints[E]['req']>(endpoint: E, userId?: string, options?: O): Promise<void | ReturnType<typeof cli.request<E, O>>> {
let account: { token: string; id: string } | void;
let account: { token: string; id: string } | void = undefined;
if (userId) {
account = await getAccountFromId(userId);