From c0df24fe014cf5ccdc79333a874f47ee7c23ea07 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Tue, 23 Jul 2024 20:57:10 -0600 Subject: [PATCH] add more type casts --- src/libs/endorserServer.ts | 4 +-- src/views/AccountViewView.vue | 2 +- src/views/ClaimAddRawView.vue | 3 +- src/views/ConfirmGiftView.vue | 3 +- src/views/ContactAmountsView.vue | 3 +- src/views/DIDView.vue | 5 +-- src/views/DiscoverView.vue | 3 +- src/views/GiftedDetails.vue | 44 +++++++++++++++----------- src/views/IdentitySwitcherView.vue | 3 +- src/views/ImportAccountView.vue | 5 +-- src/views/ImportDerivedAccountView.vue | 12 ++++--- src/views/NewEditAccountView.vue | 6 ++-- src/views/NewEditProjectView.vue | 5 +-- src/views/NewIdentifierView.vue | 4 ++- src/views/ProjectViewView.vue | 17 ++++++---- src/views/ProjectsView.vue | 7 ++-- src/views/QuickActionBvcEndView.vue | 8 +++-- src/views/SearchAreaView.vue | 3 +- src/views/SharedPhotoView.vue | 15 ++++++--- src/views/StartView.vue | 9 +++--- src/views/TestView.vue | 3 +- 21 files changed, 100 insertions(+), 64 deletions(-) diff --git a/src/libs/endorserServer.ts b/src/libs/endorserServer.ts index 3a89468ef..ce2b5753a 100644 --- a/src/libs/endorserServer.ts +++ b/src/libs/endorserServer.ts @@ -56,12 +56,12 @@ export interface GenericVerifiableCredential { export interface GenericCredWrapper { "@context": string; "@type": string; + claim: T; + claimType?: string; handleId: string; id: string; issuedAt: string; issuer: string; - claim: T; - claimType?: string; } export const BLANK_GENERIC_SERVER_RECORD: GenericCredWrapper = { diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index 2554de6f3..565ed181c 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -1092,7 +1092,7 @@ export default class AccountViewView extends Vue { } async uploadImportFile(event: Event) { - inputImportFileNameRef.value = event.target.files[0]; + inputImportFileNameRef.value = (event.target as EventTarget).files[0]; } showContactImport() { diff --git a/src/views/ClaimAddRawView.vue b/src/views/ClaimAddRawView.vue index 18a8df87d..f3e73c443 100644 --- a/src/views/ClaimAddRawView.vue +++ b/src/views/ClaimAddRawView.vue @@ -30,6 +30,7 @@ diff --git a/src/views/NewEditProjectView.vue b/src/views/NewEditProjectView.vue index 2aecc06e3..6d5f4d0f8 100644 --- a/src/views/NewEditProjectView.vue +++ b/src/views/NewEditProjectView.vue @@ -180,6 +180,7 @@ import { AxiosError, AxiosRequestHeaders } from "axios"; import { DateTime } from "luxon"; import { Component, Vue } from "vue-facing-decorator"; import { LMap, LMarker, LTileLayer } from "@vue-leaflet/vue-leaflet"; +import { Router } from "vue-router"; import ImageMethodDialog from "@/components/ImageMethodDialog.vue"; import QuickNav from "@/components/QuickNav.vue"; @@ -423,7 +424,7 @@ export default class NewEditProjectView extends Vue { useAppStore() .setProjectId(resp.data.success.handleId) .then(() => { - this.$router.push({ name: "project" }); + (this.$router as Router).push({ name: "project" }); }); } else { console.error( @@ -521,7 +522,7 @@ export default class NewEditProjectView extends Vue { } public onCancelClick() { - this.$router.back(); + (this.$router as Router).back(); } } diff --git a/src/views/NewIdentifierView.vue b/src/views/NewIdentifierView.vue index 76030266e..4ff77eb9b 100644 --- a/src/views/NewIdentifierView.vue +++ b/src/views/NewIdentifierView.vue @@ -54,6 +54,8 @@ diff --git a/src/views/TestView.vue b/src/views/TestView.vue index 9d1324275..4570f0e70 100644 --- a/src/views/TestView.vue +++ b/src/views/TestView.vue @@ -242,6 +242,7 @@ import { Buffer } from "buffer/"; import { Base64URLString } from "@simplewebauthn/types"; import { ref } from "vue"; import { Component, Vue } from "vue-facing-decorator"; +import { Router } from "vue-router"; import QuickNav from "@/components/QuickNav.vue"; import { AppString, NotificationIface } from "@/constants/app"; @@ -349,7 +350,7 @@ export default class Help extends Vue { this.userName = DEFAULT_USERNAME; }, onYes: async () => { - this.$router.push({ name: "new-edit-account" }); + (this.$router as Router).push({ name: "new-edit-account" }); }, noText: "try again and use " + DEFAULT_USERNAME, },