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 42055a2d66
commit a2e19d7e9a
9 changed files with 92 additions and 84 deletions

View File

@@ -30,7 +30,12 @@ export interface OfferVerifiableCredential extends GenericVerifiableCredential {
includesObject?: { amountOfThisGood: number; unitCode: string };
itemOffered?: {
description?: string;
isPartOf?: { identifier?: string; lastClaimId?: string; "@type"?: string };
isPartOf?: {
identifier?: string;
lastClaimId?: string;
"@type"?: string;
name?: string;
};
};
offeredBy?: { identifier: string };
recipient?: { identifier: string };