fruit-company
Version:
Apple services library
38 lines (37 loc) • 1.22 kB
TypeScript
import { CurrentWeather } from "./current-weather";
import { DailyForecast } from "./daily-forecast";
import { HourlyForecast } from "./hourly-forecast";
import { NextHourForecast } from "./next-hour-forecast";
import { WeatherAlertCollection } from "./weather-alert-collection";
/**
* The collection of all requested weather data.
*/
export interface Weather {
/**
* The current weather for the requested location.
*/
readonly currentWeather?: CurrentWeather;
/**
* The daily forecast for the requested location.
*/
readonly forecastDaily?: DailyForecast;
/**
* The hourly forecast for the requested location.
*/
readonly forecastHourly?: HourlyForecast;
/**
* The next hour forecast for the requested location.
*/
readonly forecastNextHour?: NextHourForecast;
/**
* Weather alerts for the requested location.
*/
readonly weatherAlerts?: WeatherAlertCollection;
}
/**
* Create a `Weather` object from a given JSON representation.
*
* @param raw A string containing a JSON representation of a `Weather` object.
* @returns A parsed `Weather` object ready for use.
*/
export declare function parseWeather(raw: string): Weather;