UNPKG

@eggtronic/react-weather-widget

Version:
9 lines (8 loc) 603 B
import { LineChartData } from '../types/weatherWidget'; import { WeatherData } from '../types/weatherWidget'; export declare type FnReturningPromise = (...args: any[]) => Promise<any>; export declare type PromiseType<P extends Promise<any>> = P extends Promise<infer T> ? T : never; declare const BASE_API_URL = "https://api.openweathermap.org/data/2.5/onecall?"; declare const ICON_BASE_URL = "http://openweathermap.org/img/wn/"; declare const getHourlyData: (hourlyData: WeatherData['hourly'], from: number, to: number) => LineChartData; export { getHourlyData, ICON_BASE_URL, BASE_API_URL };