1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 17:36:38 +02:00

Bundled output for commit d268894e61

Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
This commit is contained in:
flarum-bot
2021-12-27 19:02:33 +00:00
parent d268894e61
commit 3d62a6af27
67 changed files with 578 additions and 615 deletions

View File

@@ -34,20 +34,15 @@ export default class Drawer {
* Check whether or not the drawer is currently open.
*
* @return {boolean}
* @public
*/
public isOpen(): boolean;
isOpen(): boolean;
/**
* Hide the drawer.
*
* @public
*/
public hide(): void;
hide(): void;
/**
* Show the drawer.
*
* @public
*/
public show(): void;
show(): void;
$backdrop: JQuery<HTMLElement> | undefined;
}

View File

@@ -192,7 +192,7 @@ export default class ItemList<T> {
*
* @param content The item's content (objects only)
* @param key The item's key
* @returns Proxied content
* @return Proxied content
*
* @internal
*/

View File

@@ -6,7 +6,6 @@ export default class ScrollListener {
/**
* @param {(top: number) => void} callback The callback to run when the scroll position
* changes.
* @public
*/
constructor(callback: (top: number) => void);
callback: (top: number) => void;
@@ -20,21 +19,15 @@ export default class ScrollListener {
protected loop(): void;
/**
* Run the callback, whether there was a scroll event or not.
*
* @public
*/
public update(): void;
update(): void;
/**
* Start listening to and handling the window's scroll position.
*
* @public
*/
public start(): void;
start(): void;
active: (() => void) | null | undefined;
/**
* Stop listening to and handling the window's scroll position.
*
* @public
*/
public stop(): void;
stop(): void;
}

View File

@@ -8,7 +8,7 @@
* position can be anchor to an element that is in or below the viewport, so
* the content in the viewport will stay the same.
*
* @param {DOMElement} element The element to anchor the scroll position to.
* @param {Function} callback The callback to run that will change page content.
* @param {HTMLElement | SVGElement | Element} element The element to anchor the scroll position to.
* @param {() => void} callback The callback to run that will change page content.
*/
export default function anchorScroll(element: any, callback: Function): void;
export default function anchorScroll(element: HTMLElement | SVGElement | Element, callback: () => void): void;

View File

@@ -3,9 +3,8 @@ import Model from '../Model';
* The `computed` utility creates a function that will cache its output until
* any of the dependent values are dirty.
*
* @param {...String} dependentKeys The keys of the dependent values.
* @param {function} compute The function which computes the value using the
* @param dependentKeys The keys of the dependent values.
* @param compute The function which computes the value using the
* dependent values.
* @return {Function}
*/
export default function computed<T, M = Model>(...args: [...string[], (this: M, ...args: unknown[]) => T]): () => T;

View File

@@ -1,79 +1,97 @@
declare namespace _default {
const handlers: Object;
const handlers: Record<string, unknown>;
/**
* Get all of the registered handlers for an event.
*
* @param {String} event The name of the event.
* @return {Array}
* @param {string} event The name of the event.
* @return {Function[]}
* @protected
*
* @deprecated
*/
function getHandlers(event: string): any[];
function getHandlers(event: string): Function[];
/**
* Get all of the registered handlers for an event.
*
* @param {String} event The name of the event.
* @return {Array}
* @param {string} event The name of the event.
* @return {Function[]}
* @protected
*
* @deprecated
*/
function getHandlers(event: string): any[];
function getHandlers(event: string): Function[];
/**
* Trigger an event.
*
* @param {String} event The name of the event.
* @param {...*} args Arguments to pass to event handlers.
* @public
* @param {string} event The name of the event.
* @param {any[]} args Arguments to pass to event handlers.
*
* @deprecated
*/
function trigger(event: string, ...args: any[]): void;
/**
* Trigger an event.
*
* @param {String} event The name of the event.
* @param {...*} args Arguments to pass to event handlers.
* @public
* @param {string} event The name of the event.
* @param {any[]} args Arguments to pass to event handlers.
*
* @deprecated
*/
function trigger(event: string, ...args: any[]): void;
/**
* Register an event handler.
*
* @param {String} event The name of the event.
* @param {function} handler The function to handle the event.
* @param {string} event The name of the event.
* @param {Function} handler The function to handle the event.
*
* @deprecated
*/
function on(event: string, handler: Function): void;
/**
* Register an event handler.
*
* @param {String} event The name of the event.
* @param {function} handler The function to handle the event.
* @param {string} event The name of the event.
* @param {Function} handler The function to handle the event.
*
* @deprecated
*/
function on(event: string, handler: Function): void;
/**
* Register an event handler so that it will run only once, and then
* unregister itself.
*
* @param {String} event The name of the event.
* @param {function} handler The function to handle the event.
* @param {string} event The name of the event.
* @param {Function} handler The function to handle the event.
*
* @deprecated
*/
function one(event: string, handler: Function): void;
/**
* Register an event handler so that it will run only once, and then
* unregister itself.
*
* @param {String} event The name of the event.
* @param {function} handler The function to handle the event.
* @param {string} event The name of the event.
* @param {Function} handler The function to handle the event.
*
* @deprecated
*/
function one(event: string, handler: Function): void;
/**
* Unregister an event handler.
*
* @param {String} event The name of the event.
* @param {function} handler The function that handles the event.
* @param {string} event The name of the event.
* @param {Function} handler The function that handles the event.
*
* @deprecated
*/
function off(event: string, handler: Function): void;
/**
* Unregister an event handler.
*
* @param {String} event The name of the event.
* @param {function} handler The function that handles the event.
* @param {string} event The name of the event.
* @param {Function} handler The function that handles the event.
*
* @deprecated
*/
function off(event: string, handler: Function): void;
}

View File

@@ -5,8 +5,8 @@
* @example
* class MyClass extends mixin(ExistingClass, evented, etc) {}
*
* @param {Class} Parent The class to extend the new class from.
* @param {...Object} mixins The objects to mix in.
* @return {Class} A new class that extends Parent and contains the mixins.
* @param {object} Parent The class to extend the new class from.
* @param {Record<string, any>[]} mixins The objects to mix in.
* @return {object} A new class that extends Parent and contains the mixins.
*/
export default function mixin(Parent: any, ...mixins: Object[]): any;
export default function mixin(Parent: object, ...mixins: Record<string, any>[]): object;