maz-ui
Version:
A standalone components library for Vue.Js 3 & Nuxt.Js 3
27 lines (26 loc) • 869 B
TypeScript
import { CountryCode } from 'libphonenumber-js';
export interface CountryOption {
code: CountryCode;
dialCode: string;
name: string;
}
declare function getBrowserLocale(): {
locale: string;
browserLocale: string;
} | undefined;
declare function getCountryList(locale?: string, customCountriesNameListByIsoCode?: Record<CountryCode, string>): CountryOption[] | undefined;
declare function fetchCountryCode(): Promise<{
data: CountryCode;
error: undefined;
} | {
data: undefined;
error: Error;
}>;
declare function sanitizePhoneNumber(input?: string | undefined | null): string;
export declare function useMazInputPhoneNumber(): {
fetchCountryCode: typeof fetchCountryCode;
getBrowserLocale: typeof getBrowserLocale;
getCountryList: typeof getCountryList;
sanitizePhoneNumber: typeof sanitizePhoneNumber;
};
export {};