mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-18 19:00:50 +00:00
1fac82f895
- Creates a new user-preference called 'VectorSidebarVisible' which stores the sidebar hidden/collapsed state for logged-in users. - Updates that user-preference on the client whenever the sidebar is expanded or collapsed. - Refactors the sidebar related javascript into a separate file. Bug: T255727 Change-Id: Ib1ce934f3646cd8feebf0d3b15c38b5b969ec957
31 lines
871 B
TypeScript
31 lines
871 B
TypeScript
interface MwApi {
|
|
saveOption( name: string, value: unknown ): JQuery.Promise<any>;
|
|
}
|
|
|
|
type MwApiConstructor = new( options?: Object ) => MwApi;
|
|
|
|
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;
|
|
};
|
|
Api: MwApiConstructor;
|
|
config: {
|
|
get( configKey: string|null ): string;
|
|
}
|
|
}
|
|
|
|
declare const mw: MediaWiki;
|