Skip to content

Commit 156d905

Browse files
committed
add typing for slackloginwindow
1 parent 5095bb6 commit 156d905

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/components/slack_login/SlackLoginWindow.vue

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
</template>
7070

7171
<script setup lang="ts">
72+
// @ts-ignore
7273
import localforage from "localforage";
7374
import { useStore } from "vuex";
7475
import { ref } from "vue";
@@ -79,13 +80,16 @@ let isAuthenticating = ref(false);
7980
let showLogin = ref(false);
8081
const errorMessage = ref("");
8182
82-
ipcRenderer.on("tokenReceived", (event, data) => {
83-
return saveToLocalForage("slackWebhookURL", data.incoming_webhook.url);
84-
});
85-
ipcRenderer.on("slackUser", (event, user) => {
83+
ipcRenderer.on(
84+
"tokenReceived",
85+
(event: Event, data: { incoming_webhook: { url: string } }) => {
86+
return saveToLocalForage("slackWebhookURL", data.incoming_webhook.url);
87+
}
88+
);
89+
ipcRenderer.on("slackUser", (event: Event, user: string) => {
8690
return saveToLocalForage("slackUser", user);
8791
});
88-
ipcRenderer.on("slackError", (event, err) => {
92+
ipcRenderer.on("slackError", (event: Event, err: Error) => {
8993
printErrorMessage();
9094
});
9195

0 commit comments

Comments
 (0)