Browse Source

Fix TypeScript any type warnings in Vue components

Replace generic 'any' types with specific type definitions:
- EntitySummaryButton: Define edit-requested event payload type
- GiftDetailsStep: Add proper types for edit-entity and submit events
- HomeView: Use GiftedDialog type for customDialog ref

Resolves 7 TypeScript linting warnings, improves type safety
pull/142/head
Matthew Raymer 1 day ago
parent
commit
1ceea19fb5
  1. 5
      src/components/EntitySummaryButton.vue
  2. 11
      src/components/GiftDetailsStep.vue
  3. 2
      src/views/HomeView.vue

5
src/components/EntitySummaryButton.vue

@ -123,7 +123,10 @@ export default class EntitySummaryButton extends Vue {
// Emit methods using @Emit decorator
@Emit("edit-requested")
emitEditRequested(data: any): any {
emitEditRequested(data: {
entityType: string;
entity: EntityData | Contact | null;
}): { entityType: string; entity: EntityData | Contact | null } {
return data;
}
}

11
src/components/GiftDetailsStep.vue

@ -390,7 +390,10 @@ export default class GiftDetailsStep extends Vue {
}
@Emit("edit-entity")
emitEditEntity(data: any): any {
emitEditEntity(data: {
entityType: string;
currentEntity: EntityData | null;
}): { entityType: string; currentEntity: EntityData | null } {
return data;
}
@ -400,7 +403,11 @@ export default class GiftDetailsStep extends Vue {
}
@Emit("submit")
emitSubmit(data: any): any {
emitSubmit(data: { description: string; amount: number; unitCode: string }): {
description: string;
amount: number;
unitCode: string;
} {
return data;
}

2
src/views/HomeView.vue

@ -1870,7 +1870,7 @@ export default class HomeView extends Vue {
openProjectDialog() {
this.showProjectsDialog = true;
(this.$refs.customDialog as any).open();
(this.$refs.customDialog as GiftedDialog).open();
}
}
</script>

Loading…
Cancel
Save