import { AbstractType } from "./AbstractType"; import { Req, scalar } from "@huz-com/types"; import { HostTypeOption, IpVersion } from "./index.interfaces"; declare type T = scalar.Host; declare type O = HostTypeOption; export declare class HostType extends AbstractType { protected static readonly _LABELS: string[]; protected static _ins: HostType; /** * Returns skeleton instance * */ static ins(): HostType; constructor(); protected _ipVersion(str: string): 4 | 6 | null; protected _isIp(str: string, version?: IpVersion): boolean; protected _isIpV4(str: string): boolean; protected _isIpV6(str: string): boolean; protected _isHost(str: string, subdomain?: boolean, wildcard?: boolean): boolean; protected _isLabel(str: string): boolean; protected _hasWildcard(str: string): boolean; protected _hasSubdomain(str: string): boolean; /** * Checks is host? */ is(value: scalar.Unknown, opt?: O, req?: Req): boolean; /** * Converts a value to host */ cast(value: scalar.Unknown, opt?: O, req?: Req): T | null; ipVersion(value: unknown): string; isIp(value: unknown, version?: IpVersion): boolean; isIpV4(value: unknown): boolean; isIpV6(value: unknown): boolean; isHost(value: unknown, subdomain?: boolean, wildcard?: boolean): boolean; isLabel(value: unknown): boolean; hasWildcard(value: unknown): boolean; hasSubdomain(value: unknown): boolean; } export {};