Path: blob/master/node_modules/awesome-phonenumber/index.d.ts
1126 views
1declare namespace AwesomePhonenumber2{3type PhoneNumberFormat =4'e164' |5'international' |6'national' |7'rfc3966' |8'significant';910type PhoneNumberTypes =11'fixed-line' |12'fixed-line-or-mobile' |13'mobile' |14'pager' |15'personal-number' |16'premium-rate' |17'shared-cost' |18'toll-free' |19'uan' |20'voip' |21'unknown';222324class PhoneNumber25{26constructor( phoneNumber: string, countryCode?: string );2728isValid( ): boolean;29canBeInternationallyDialled( ): boolean;30isPossible( ): boolean;31getType( ): PhoneNumberTypes;32isMobile( ): boolean;33isFixedLine( ): boolean;34getNumber( type?: PhoneNumberFormat ): string;35getNumberFrom( regionCode: string ): string;36getRegionCode( ): string;37getCountryCode( ): number;38toJSON( ): any;3940static getCountryCodeForRegionCode( regionCode: string ): number;41static getRegionCodeForCountryCode( countryCode: number ): string;42static getSupportedCallingCodes( ): string[ ];43static getSupportedRegionCodes( ): string[ ];44static getExample( regionCode: string, type?: PhoneNumberTypes ): PhoneNumber;45static getAsYouType( regionCode: string ): AsYouType;46}4748function PhoneNumber( phoneNumber: string, countryCode?: string ): PhoneNumber;4950class AsYouType51{52addChar( char: string ): string;53number( ): string;54removeChar( ): string;55reset( number?: string ): string;56getPhoneNumber( ): PhoneNumber;57}58}5960export default AwesomePhonenumber.PhoneNumber;616263