From d4704431818919fd675fee6e19e96f74a02ccb0d Mon Sep 17 00:00:00 2001 From: HotoRas Date: Sun, 13 Oct 2024 09:16:34 +0900 Subject: [PATCH] =?UTF-8?q?refactor=20(frontend):=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=EC=A0=81=EC=9D=B8=20=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0?= =?UTF-8?q?=EB=8A=94=20=EB=B0=B0=EC=A0=9C=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit os.apiWithDialog(endpoint, data, token?, signal?) => Promise<(Partial | Misskey.entities.Error['error'])>에 정의되지 않은 5번째 파라미터 (async resolve result) 주입 시 오버플로우로 돌긴 하는데 그냥 Promise.then()으로 하면 되지 않았냐? --- packages/frontend/src/scripts/get-note-menu.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/scripts/get-note-menu.ts b/packages/frontend/src/scripts/get-note-menu.ts index ebbd2efdfc58..d3ce6ce3d70f 100644 --- a/packages/frontend/src/scripts/get-note-menu.ts +++ b/packages/frontend/src/scripts/get-note-menu.ts @@ -249,7 +249,7 @@ export function getNoteMenu(props: { function togglePin(pin: boolean): void { os.apiWithDialog(pin ? 'i/pin' : 'i/unpin', { noteId: appearNote.id, - }, undefined, null, res => { + }).then((res: (Partial | Misskey.entities.Error['error'])) => { if (res.id === '72dab508-c64d-498f-8740-a8eec1ba385a') { os.alert({ type: 'error',