mediawiki-skins-Vector/resources/mediawiki.d.ts
Stephen Niedzielski bd7bd75569 [JavaScript] Validate types
Lift the mists of confusion by checking that all JavaScript types align.
No ignores! This is the JavaScript equivalent to Phan.

This patch adds the necessary infrastructure for verifying typing and
fixes the few flaws found.

Bug: T239262
Change-Id: I2557471421196ea46cd13dfb786a52968fbfcc97
2020-03-16 09:10:08 -06:00

21 lines
646 B
TypeScript

interface MediaWiki {
util: {
/**
* Return a wrapper function that is debounced for the given duration.
*
* When it is first called, a timeout is scheduled. If before the timer
* is reached the wrapper is called again, it gets rescheduled for the
* same duration from now until it stops being called. The original function
* is called from the "tail" of such chain, with the last set of arguments.
*
* @since 1.34
* @param {number} delay Time in milliseconds
* @param {Function} callback
* @return {Function}
*/
debounce(delay: number, callback: Function): () => void;
};
}
declare const mw: MediaWiki;