forked from jsnbuchanan/crowd-funder-for-time-pwa
fix: improve TypeScript type safety across views
Changes: - Add proper type annotations for component properties - Fix null checks with optional chaining - Add missing interface properties - Replace any with proper types where possible - Move interfaces from endorserServer to interfaces/ - Add proper Router and Route typing - Add default empty string for optional text fields This improves type safety and reduces TypeScript errors across views.
This commit is contained in:
@@ -496,7 +496,15 @@
|
||||
import { AxiosError } from "axios";
|
||||
import { Component, Vue } from "vue-facing-decorator";
|
||||
import { Router } from "vue-router";
|
||||
|
||||
import {
|
||||
GenericVerifiableCredential,
|
||||
GenericCredWrapper,
|
||||
GiveSummaryRecord,
|
||||
GiveVerifiableCredential,
|
||||
OfferSummaryRecord,
|
||||
OfferVerifiableCredential,
|
||||
PlanSummaryRecord,
|
||||
} from "../interfaces";
|
||||
import GiftedDialog from "../components/GiftedDialog.vue";
|
||||
import OfferDialog from "../components/OfferDialog.vue";
|
||||
import TopMessage from "../components/TopMessage.vue";
|
||||
@@ -511,14 +519,6 @@ import {
|
||||
} from "../db/index";
|
||||
import { Contact } from "../db/tables/contacts";
|
||||
import * as libsUtil from "../libs/util";
|
||||
import {
|
||||
GenericCredWrapper,
|
||||
GiveSummaryRecord,
|
||||
GiveVerifiableCredential,
|
||||
OfferSummaryRecord,
|
||||
OfferVerifiableCredential,
|
||||
PlanSummaryRecord,
|
||||
} from "../libs/endorserServer";
|
||||
import * as serverUtil from "../libs/endorserServer";
|
||||
import { retrieveAccountDids } from "../libs/util";
|
||||
import HiddenDidDialog from "../components/HiddenDidDialog.vue";
|
||||
@@ -1156,7 +1156,7 @@ export default class ProjectViewView extends Vue {
|
||||
),
|
||||
),
|
||||
);
|
||||
const confirmationClaim: serverUtil.GenericVerifiableCredential = {
|
||||
const confirmationClaim: GenericVerifiableCredential = {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "AgreeAction",
|
||||
object: goodClaim,
|
||||
|
||||
Reference in New Issue
Block a user