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:
Matthew Raymer
2025-02-25 11:36:24 +00:00
parent 52150dd6eb
commit 61da40596c
9 changed files with 92 additions and 84 deletions

View File

@@ -14,7 +14,7 @@
import { Component, Vue } from "vue-facing-decorator";
import { nextTick } from "vue";
import QRCode from "qrcode";
import { GenericVerifiableCredential } from "../interfaces";
import { APP_SERVER, NotificationIface } from "../constants/app";
import { db, retrieveSettingsForActiveAccount } from "../db/index";
import * as serverUtil from "../libs/endorserServer";
@@ -81,7 +81,7 @@ export default class ClaimCertificateView extends Vue {
}
async drawCanvas(
claimData: serverUtil.GenericCredWrapper<serverUtil.GenericVerifiableCredential>,
claimData: serverUtil.GenericCredWrapper<GenericVerifiableCredential>,
confirmerIds: Array<string>,
) {
await db.open();