gedcom-ts
Version:
TypeScript GEDCOM toolkit for browser apps: import .ged/.zip, edit typed genealogy data, and export GEDCOM or GEDZIP.
29 lines (28 loc) • 1.34 kB
TypeScript
import type { BookletDateModule } from './booklet-date-factory';
export interface ParsedPlace {
readonly city: string | null;
readonly country: string | null;
readonly raw: string;
}
export interface BookletPlaceConfig {
readonly countryPrefixes: readonly string[];
readonly countryPhrase: (country: string) => string;
readonly locationPhrase: (core: string) => string;
readonly lifeRangeSame: (core: string) => string;
readonly lifeRangeFromTo: (from: string, to: string) => string;
readonly lifeRangeSingle: (core: string) => string;
}
export interface BookletPlaceModule {
parsePlaceLabel(label: string): ParsedPlace | null;
placeCore(label: string): string;
afterDateLocation(dateLabel: string, placeLabel: string): string;
atLocation(placeLabel: string): string;
birthDeathLocationPhrases(birthDate: string, birthPlace: string, deathDate: string, deathPlace: string): {
readonly birth: string;
readonly death: string;
};
lifeRangeLocation(birthPlace: string, deathPlace: string): string;
marriageWhenWhere(dateLabel: string, placeLabel: string): string | null;
embedMarriageWhenWhere(label: string | null | undefined): string;
}
export declare function createBookletPlaceModule(date: BookletDateModule, config: BookletPlaceConfig): BookletPlaceModule;