forked from jsnbuchanan/crowd-funder-for-time-pwa
refactor: consolidate type system and improve documentation
- Move type definitions from src/types/ to src/interfaces/ for better organization - Enhance deep linking type system documentation with detailed examples - Update package dependencies to latest versions - Improve code organization in README.md - Fix formatting in WebPlatformService.ts This change consolidates all type definitions into the interfaces folder, improves type safety documentation, and updates dependencies for better maintainability. The deep linking system now has clearer documentation about its type system and validation approach. Breaking: Removes src/types/ directory in favor of src/interfaces/
This commit is contained in:
21
src/interfaces/give.ts
Normal file
21
src/interfaces/give.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { GiveSummaryRecord } from "./records";
|
||||
|
||||
// Common interface for contact information
|
||||
export interface ContactInfo {
|
||||
known: boolean;
|
||||
displayName: string;
|
||||
profileImageUrl?: string;
|
||||
}
|
||||
|
||||
// Define the contact information fields
|
||||
interface GiveContactInfo {
|
||||
giver: ContactInfo;
|
||||
issuer: ContactInfo;
|
||||
receiver: ContactInfo;
|
||||
providerPlanName?: string;
|
||||
recipientProjectName?: string;
|
||||
image?: string;
|
||||
}
|
||||
|
||||
// Combine GiveSummaryRecord with contact information using intersection type
|
||||
export type GiveRecordWithContactInfo = GiveSummaryRecord & GiveContactInfo;
|
||||
Reference in New Issue
Block a user