refactor: introduce dedicated identifier types for improved clarity and type safety

This commit is contained in:
2025-11-24 23:47:36 +01:00
parent 22f0c040a2
commit 70e7bda87e
79 changed files with 1567 additions and 1572 deletions
+4 -4
View File
@@ -1,5 +1,5 @@
export interface CorrespondentReference {
id?: string | number | null;
id?: string | null;
name?: string | null;
key?: string;
}
@@ -9,9 +9,9 @@ export interface DocumentLike {
}
export interface ResolvedCorrespondent {
id?: string | number | null;
id?: string | null;
name: string;
key: string | number;
key: string;
}
export const resolveCorrespondents = (doc?: DocumentLike | null): ResolvedCorrespondent[] => {
@@ -19,7 +19,7 @@ export const resolveCorrespondents = (doc?: DocumentLike | null): ResolvedCorres
return [];
}
const seen = new Set<string | number>();
const seen = new Set<string>();
const results: ResolvedCorrespondent[] = [];
doc.correspondents.forEach((entry = {}, index) => {