1
0
mirror of https://github.com/flarum/core.git synced 2025-07-25 18:51:40 +02:00
Files
php-flarum/js/dist-typings/forum/utils/PostControls.d.ts
flarum-bot c3a684c7ed Bundled output for commit 3537f76eab
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2021-05-12 23:29:46 +00:00

133 lines
3.6 KiB
TypeScript

declare namespace _default {
/**
* Get a list of controls for a post.
*
* @param {Post} post
* @param {*} context The parent component under which the controls menu will
* be displayed.
* @return {ItemList}
* @public
*/
function controls(post: any, context: any): ItemList;
/**
* Get a list of controls for a post.
*
* @param {Post} post
* @param {*} context The parent component under which the controls menu will
* be displayed.
* @return {ItemList}
* @public
*/
function controls(post: any, context: any): ItemList;
/**
* Get controls for a post pertaining to the current user (e.g. report).
*
* @param {Post} post
* @param {*} context The parent component under which the controls menu will
* be displayed.
* @return {ItemList}
* @protected
*/
function userControls(post: any, context: any): ItemList;
/**
* Get controls for a post pertaining to the current user (e.g. report).
*
* @param {Post} post
* @param {*} context The parent component under which the controls menu will
* be displayed.
* @return {ItemList}
* @protected
*/
function userControls(post: any, context: any): ItemList;
/**
* Get controls for a post pertaining to moderation (e.g. edit).
*
* @param {Post} post
* @param {*} context The parent component under which the controls menu will
* be displayed.
* @return {ItemList}
* @protected
*/
function moderationControls(post: any, context: any): ItemList;
/**
* Get controls for a post pertaining to moderation (e.g. edit).
*
* @param {Post} post
* @param {*} context The parent component under which the controls menu will
* be displayed.
* @return {ItemList}
* @protected
*/
function moderationControls(post: any, context: any): ItemList;
/**
* Get controls for a post that are destructive (e.g. delete).
*
* @param {Post} post
* @param {*} context The parent component under which the controls menu will
* be displayed.
* @return {ItemList}
* @protected
*/
function destructiveControls(post: any, context: any): ItemList;
/**
* Get controls for a post that are destructive (e.g. delete).
*
* @param {Post} post
* @param {*} context The parent component under which the controls menu will
* be displayed.
* @return {ItemList}
* @protected
*/
function destructiveControls(post: any, context: any): ItemList;
/**
* Open the composer to edit a post.
*
* @return {Promise}
*/
function editAction(): Promise<any>;
/**
* Open the composer to edit a post.
*
* @return {Promise}
*/
function editAction(): Promise<any>;
/**
* Hide a post.
*
* @return {Promise}
*/
function hideAction(): Promise<any>;
/**
* Hide a post.
*
* @return {Promise}
*/
function hideAction(): Promise<any>;
/**
* Restore a post.
*
* @return {Promise}
*/
function restoreAction(): Promise<any>;
/**
* Restore a post.
*
* @return {Promise}
*/
function restoreAction(): Promise<any>;
/**
* Delete a post.
*
* @return {Promise}
*/
function deleteAction(context: any): Promise<any>;
/**
* Delete a post.
*
* @return {Promise}
*/
function deleteAction(context: any): Promise<any>;
}
export default _default;
import ItemList from "../../common/utils/ItemList";