summaryrefslogtreecommitdiff
path: root/packages/sw/src/scripts/get-account-from-id.ts
diff options
context:
space:
mode:
authorzyoshoka <107108195+zyoshoka@users.noreply.github.com>2024-08-30 15:53:04 +0900
committerGitHub <noreply@github.com>2024-08-30 15:53:04 +0900
commit8be624aa4441dbbc3f911453d22b70dee8a685b5 (patch)
treee462548621295abd588559d01ddf434e45c2c191 /packages/sw/src/scripts/get-account-from-id.ts
parentfix(frontend): server metrics look strange after reload (#14467) (diff)
downloadmisskey-8be624aa4441dbbc3f911453d22b70dee8a685b5.tar.gz
misskey-8be624aa4441dbbc3f911453d22b70dee8a685b5.tar.bz2
misskey-8be624aa4441dbbc3f911453d22b70dee8a685b5.zip
refactor(sw): fix type errors (#14478)
* style(sw): lint fixes * refactor(sw): fix type errors * chore(sw): disable `noImplicitAny` * ci(sw): enable typecheck ci * ci(sw): build `misskey-js` before typecheck
Diffstat (limited to 'packages/sw/src/scripts/get-account-from-id.ts')
-rw-r--r--packages/sw/src/scripts/get-account-from-id.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/sw/src/scripts/get-account-from-id.ts b/packages/sw/src/scripts/get-account-from-id.ts
index 19bfe052ee..157dbd005e 100644
--- a/packages/sw/src/scripts/get-account-from-id.ts
+++ b/packages/sw/src/scripts/get-account-from-id.ts
@@ -4,9 +4,10 @@
*/
import { get } from 'idb-keyval';
+import * as Misskey from 'misskey-js';
-export async function getAccountFromId(id: string): Promise<{ token: string; id: string } | void> {
- const accounts = await get<{ token: string; id: string }[]>('accounts');
+export async function getAccountFromId(id: string): Promise<Pick<Misskey.entities.SignupResponse, 'id' | 'token'> | undefined> {
+ const accounts = await get<Pick<Misskey.entities.SignupResponse, 'id' | 'token'>[]>('accounts');
if (!accounts) {
console.log('Accounts are not recorded');
return;