Open chris-pardy opened 4 years ago
I'll just leave this here for now, until I can make a pull request to include the Typescript definitions.
declare module "parse-full-name" { export type PartToReturnSingle = "title" | "first" | "middle" | "last" | "nick" | "suffix" | "error"; export type PartToReturnAll = "all" | undefined | null; export type FixCase = -1 | 0 | 1; export interface FullNameParsed { title: string; first: string; middle: string; last: string; nick: string; suffix: string; error: string[]; } export function parseFullName(nameToParse: string, partToReturn: PartToReturnSingle, fixCase?: FixCase, stopOnError?: boolean, useLongLists?: boolean): string; export function parseFullName(nameToParse: string, partToReturn?: PartToReturnAll, fixCase?: FixCase, stopOnError?: boolean, useLongLists?: boolean): FullNameParsed; export function parseFullName(nameToParse: string, partToReturn?: PartToReturnAll | PartToReturnSingle, fixCase?: FixCase, stopOnError?: boolean, useLongLists?: boolean): string | FullNameParsed; }
Port of dschnelldavis/parse-full-name#6
I'll just leave this here for now, until I can make a pull request to include the Typescript definitions.