UNPKG

owm-onecall-api

Version:
24 lines (23 loc) 903 B
import { TimeMachineDate } from "../types"; /** * Check if value is a number, or if a string can be parsed into a number. * * @param value Value to check. * @returns `true` if it is a valid number. */ export declare function isNumber(value: any): boolean; /** * Check if a value is an object. * * @param value Variable to check if it is an object. * @returns `true` if value is an object. */ export declare function isObject(value: any): boolean; /** * Convert a [[TimeMachineDate]] into a Unix timestamp value that OpenWeatherMap accepts. * * @param time The TimeMachineDate value to be converted into a Unix timestamp. * @returns `undefined` if the property is not set, and a Unix timestamp if defined. * @throws Error if [[time]] is not a number or a [[Date]] object. */ export declare function parseTimeMachineDate(time?: TimeMachineDate): number | undefined;