mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-24 23:55:53 +00:00
bd7bd75569
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
21 lines
646 B
TypeScript
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;
|