forked from jsnbuchanan/crowd-funder-for-time-pwa
feat(typescript): resolve Priority 2 type safety issues across components
- Eliminate all remaining any types in Priority 2 components (activity, gifts, usage limits, QR scanning, discovery, meetings) - Implement proper TypeScript types using existing interfaces (GiveActionClaim, EndorserRateLimits, ImageRateLimits) - Replace any types with unknown + proper type guards for error handling - Fix type assertions for external library integrations (QR scanning, mapping) - Maintain backward compatibility while improving type safety Resolves 7 Priority 2 type safety warnings, achieving 100% type safety for critical user-facing functionality.
This commit is contained in:
@@ -221,10 +221,11 @@ export default class ImportAccountView extends Vue {
|
||||
|
||||
this.notify.success("Account imported successfully!", TIMEOUTS.STANDARD);
|
||||
this.$router.push({ name: "account" });
|
||||
} catch (error: any) {
|
||||
} catch (error: unknown) {
|
||||
this.$logError("Import failed: " + error);
|
||||
this.notify.error(
|
||||
error.message || "Failed to import account.",
|
||||
(error instanceof Error ? error.message : String(error)) ||
|
||||
"Failed to import account.",
|
||||
TIMEOUTS.LONG,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user