UNPKG

@devix-tecnologia/value-objects

Version:

Coleção de objetos de valores para implementação em sistemas.

38 lines 1.21 kB
import { IBaseClassNumbers, ValidConfig } from '../types/base_class.js'; interface PhoneInput { countryCode: string; areaCode: string; phoneNum: string; } /** * Cria objeto de valor para número de telefone. * Valida DDD e código do país. * É possível cadastrar usando formato string para números Brasileiros. * Aceita formatos como: 27 97645-5555 ou 55 27 97645-5555. * Desconsidera espaços e qq caracter não numérico */ declare class Telefone implements IBaseClassNumbers { private _phoneNum; private _areaCode; private _countryCode; private _isValid; private static readonly VERSION; constructor(phoneNum: string | PhoneInput); private parseFromString; private parseFromObject; get type(): string; get version(): string; get validation(): string; get formatted(): string; get onlyNumbers(): string; get country(): string; get estate(): string | null; toJSON(): object; toString(): string; isValid(config?: ValidConfig): boolean; equals(other: Telefone | unknown): boolean; private isDDDValid; private isCountryCodeValid; } export { Telefone, type PhoneInput }; //# sourceMappingURL=index.d.ts.map