forked from trent_larson/crowd-funder-for-time-pwa
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user