add more type casts

This commit is contained in:
2024-07-23 20:57:10 -06:00
parent d724d8093c
commit 59820a2f01
21 changed files with 100 additions and 64 deletions

View File

@@ -404,6 +404,7 @@
<script lang="ts">
import { AxiosError } from "axios";
import { Component, Vue } from "vue-facing-decorator";
import { Router } from "vue-router";
import GiftedDialog from "@/components/GiftedDialog.vue";
import OfferDialog from "@/components/OfferDialog.vue";
@@ -423,7 +424,9 @@ import {
getHeaders,
GiverReceiverInputInfo,
GiveSummaryRecord,
GiveVerifiableCredential,
OfferSummaryRecord,
OfferVerifiableCredential,
PlanSummaryRecord,
} from "@/libs/endorserServer";
import * as serverUtil from "@/libs/endorserServer";
@@ -496,7 +499,7 @@ export default class ProjectViewView extends Vue {
const route = {
name: "new-edit-project",
};
this.$router.push(route);
(this.$router as Router).push(route);
}
// Isn't there a better way to make this available to the template?
@@ -820,7 +823,7 @@ export default class ProjectViewView extends Vue {
const route = {
path: "/project/" + encodeURIComponent(projectId),
};
this.$router.push(route);
(this.$router as Router).push(route);
this.loadProject(projectId, this.activeDid);
}
@@ -856,18 +859,18 @@ export default class ProjectViewView extends Vue {
const route = {
name: "contact-gift",
};
this.$router.push(route);
(this.$router as Router).push(route);
}
onClickLoadClaim(jwtId: string) {
const route = {
path: "/claim/" + encodeURIComponent(jwtId),
};
this.$router.push(route);
(this.$router as Router).push(route);
}
checkIsFulfillable(offer: OfferSummaryRecord) {
const offerRecord: GenericCredWrapper = {
const offerRecord: GenericCredWrapper<OfferVerifiableCredential> = {
...BLANK_GENERIC_SERVER_RECORD,
claim: offer.fullClaim,
claimType: "Offer",
@@ -877,7 +880,7 @@ export default class ProjectViewView extends Vue {
}
onClickFulfillGiveToOffer(offer: OfferSummaryRecord) {
const offerRecord: GenericCredWrapper = {
const offerRecord: GenericCredWrapper<OfferVerifiableCredential> = {
...BLANK_GENERIC_SERVER_RECORD,
claim: offer.fullClaim,
issuer: offer.offeredByDid,
@@ -922,7 +925,7 @@ export default class ProjectViewView extends Vue {
}
checkIsConfirmable(give: GiveSummaryRecord) {
const giveDetails: GenericCredWrapper = {
const giveDetails: GenericCredWrapper<GiveVerifiableCredential> = {
...BLANK_GENERIC_SERVER_RECORD,
claim: give.fullClaim,
claimType: "GiveAction",