export interface BaseTokenProps { start: number; end: number; reason: string; string: string; } export interface Email extends BaseTokenProps { isEmail: true; protocol: string; local: string; host: string; } export interface URL extends BaseTokenProps { isURL: true; protocol: string; host: string; port: string; ipv4: string; ipv6: string; confirmedByProtocol: boolean; path: string; query: string; fragment: string; } export interface File extends BaseTokenProps { isFile: true; filename: string; filePath: string; fileDirectory: string; } type TokenProps = Email & File & URL; export type ListingProps = Partial & BaseTokenProps; export type DesiredValues = { [key: string]: string | undefined | true; } | number | string | boolean; export type TransformationOption = desiredValue | ((string: string, props: Partial & { string: string; }) => desiredValue); export interface Options { specialTransform: { test: RegExp; transform: (input: string, props: Partial & { string: string; }) => string; }[]; skipHTML?: boolean; protocol: TransformationOption; truncate: TransformationOption; middleTruncation: TransformationOption; exclude: TransformationOption; attributes: TransformationOption<{ [key: string]: string | undefined | true; }>; } export {};