UNPKG

@microsoft/mgt

Version:
71 lines (70 loc) 2.01 kB
/** * ------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. * See License in the project root for license information. * ------------------------------------------------------------------------------------------- */ /** * returns a promise that resolves after specified time * @param time in milliseconds */ export declare function delay(ms: number): Promise<void>; /** * returns month and day * * @export * @param {Date} date * @returns */ export declare function getShortDateString(date: Date): string; /** * returns month string based on number * * @export * @param {number} month * @returns {string} */ export declare function getMonthString(month: number): string; /** * returns day of week string based on number * where 0 === Sunday * * @export * @param {number} day * @returns {string} */ export declare function getDayOfWeekString(day: number): string; /** * retrieve the days in the month provided by number * * @export * @param {number} monthNum * @returns {number} */ export declare function getDaysInMonth(monthNum: number): number; /** * returns serialized date from month number and year number * * @export * @param {number} month * @param {number} year * @returns */ export declare function getDateFromMonthYear(month: number, year: number): Date; /** * ensures one call at a time * * @export * @param {*} func * @param {*} time * @returns */ export declare function debounce(func: any, time: any): () => void; /** * Crude implementation of equivalence between the two specified arguments. * * The primary intent of this function is for comparing data contexts, which * are expected to be object literals with potentially nested structures and * where leaf values are primitives. */ export declare function equals(o1: any, o2: any): boolean;