UNPKG

@tastekim/chat-cli

Version:

💬Connect with developers worldwide through an interactive terminal chat experience while you code!💻

34 lines (33 loc) 1.05 kB
export interface LocationInfo { country: string; countryCode: string; source: 'ip' | 'locale'; } export declare class LocationDetector { private static readonly TIMEOUT_MS; /** * 사용자의 지역 정보를 감지합니다. * IP 기반 감지를 우선 시도하고, 실패 시 로케일 기반으로 fallback합니다. */ static detectLocation(): Promise<LocationInfo>; /** * IP 기반으로 지역 정보를 가져옵니다. */ private static getLocationFromIP; /** * 시스템 로케일 기반으로 지역 정보를 가져옵니다. */ private static getLocationFromLocale; /** * 국가 코드를 국가명으로 변환합니다. */ private static getCountryNameFromCode; /** * 국가 코드를 이모지 플래그로 변환합니다. */ static getCountryFlag(countryCode: string): string; /** * 지역 정보를 읽기 쉬운 형태로 포맷합니다. */ static formatLocation(locationInfo: LocationInfo): string; }