UNPKG

text-to-map

Version:

Text To Map usiluje o lepší, strojově zpracovatelné využití částí vyhlášek s výčtem ulic a dalších lokací. Jde o rozšiřitelnou sadu konceptů a nástrojů, které zajistí hladký převod výčtu ulic a jejich rozsahů v lidsky srozumitelném jazyce do strojově zpra

25 lines (24 loc) 1.55 kB
import { Founder, SchoolType } from "../db/types"; import { ErrorCallbackParams, IntermediateMunicipality, IntermediateMunicipalityResult, IntermediateSchool, Municipality, ProcessLineCallbackParams, SmdError, SmdState } from "./types"; interface ParseOrdinanceProps { lines: string[]; initialState?: Partial<SmdState>; onError?: (params: ErrorCallbackParams) => void; onWarning?: (params: ErrorCallbackParams) => void; onProcessedLine?: (params: ProcessLineCallbackParams) => void; includeUnmappedAddressPoints: boolean; schoolType: SchoolType; } export declare const parseOrdinanceToAddressPoints: ({ lines, initialState, onError, onWarning, onProcessedLine, includeUnmappedAddressPoints, schoolType, }: ParseOrdinanceProps) => Promise<Municipality[]>; export declare const convertMunicipality: (municipality: IntermediateMunicipality) => Municipality; export declare const getNewMunicipalityByName: (name: string, schoolType: SchoolType) => Promise<IntermediateMunicipalityResult>; export declare const getNewMunicipalityByFounderId: (founderId: number, schoolType: SchoolType) => Promise<IntermediateMunicipalityResult>; export declare const getNewSchool: ({ name, founder, lineNumber, required, onError, }: { name: string; founder: Founder | null; lineNumber: number; required: boolean; onError: (params: ErrorCallbackParams) => void; }) => Promise<IntermediateSchool | null>; export declare const wholeLineError: (message: string, line: string) => SmdError; export {};