refactor(frontend): フロントエンドの型エラー解消 (#16779)

This commit is contained in:
かっこかり 2025-11-10 16:52:42 +09:00 committed by GitHub
parent fd2fe34270
commit 39e01b1dfe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 1 deletions

View File

@ -120,6 +120,7 @@ function onPasskeyLogin(): void {
.then((res) => { .then((res) => {
passkeyContext.value = res.context ?? ''; passkeyContext.value = res.context ?? '';
credentialRequest.value = parseRequestOptionsFromJSON({ credentialRequest.value = parseRequestOptionsFromJSON({
// @ts-expect-error TODO: misskey-js@simplewebauthn/types@github/webauthn-json
publicKey: res.option, publicKey: res.option,
}); });
@ -134,7 +135,7 @@ function onPasskeyDone(credential: AuthenticationPublicKeyCredential): void {
waiting.value = true; waiting.value = true;
if (doingPasskeyFromInputPage.value) { if (doingPasskeyFromInputPage.value) {
misskeyApi('signin-with-passkey', { misskeyApi<Misskey.entities.SigninWithPasskeyResponse>('signin-with-passkey', {
credential: credential.toJSON(), credential: credential.toJSON(),
context: passkeyContext.value, context: passkeyContext.value,
}).then((res) => { }).then((res) => {
@ -149,6 +150,7 @@ function onPasskeyDone(credential: AuthenticationPublicKeyCredential): void {
tryLogin({ tryLogin({
username: userInfo.value.username, username: userInfo.value.username,
password: password.value, password: password.value,
// @ts-expect-error TODO: misskey-js@simplewebauthn/types@github/webauthn-json
credential: credential.toJSON(), credential: credential.toJSON(),
}); });
} }
@ -253,6 +255,7 @@ async function tryLogin(req: Partial<Misskey.entities.SigninFlowRequest>): Promi
case 'passkey': { case 'passkey': {
if (webAuthnSupported()) { if (webAuthnSupported()) {
credentialRequest.value = parseRequestOptionsFromJSON({ credentialRequest.value = parseRequestOptionsFromJSON({
// @ts-expect-error TODO: misskey-js@simplewebauthn/types@github/webauthn-json
publicKey: res.authRequest, publicKey: res.authRequest,
}); });
page.value = 'passkey'; page.value = 'passkey';

View File

@ -3512,6 +3512,7 @@ type SigninFlowRequest = {
'g-recaptcha-response'?: string | null; 'g-recaptcha-response'?: string | null;
'turnstile-response'?: string | null; 'turnstile-response'?: string | null;
'm-captcha-response'?: string | null; 'm-captcha-response'?: string | null;
'testcaptcha-response'?: string | null;
}; };
// @public (undocumented) // @public (undocumented)

View File

@ -294,6 +294,7 @@ export type SigninFlowRequest = {
'g-recaptcha-response'?: string | null; 'g-recaptcha-response'?: string | null;
'turnstile-response'?: string | null; 'turnstile-response'?: string | null;
'm-captcha-response'?: string | null; 'm-captcha-response'?: string | null;
'testcaptcha-response'?: string | null;
}; };
export type SigninFlowResponse = { export type SigninFlowResponse = {