mirror of
https://github.com/flarum/core.git
synced 2025-07-12 12:26:23 +02:00
chore: 1.2 JS clean-up (#3214)
* fix: `extend.ts` TS error * docs: fix incorrect JS docblocks * chore: simplify some code * chore: remove usages of prefixed JS function * chore: consistent empty return types * chore: format * fix: typing errors * chore: remove unneeded `@public` docblock modifiers * Apply suggestions from code review * Update js/src/forum/utils/slidable.js Co-authored-by: Alexander Skvortsov <38059171+askvortsov1@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Alexander Skvortsov <38059171+askvortsov1@users.noreply.github.com>
This commit is contained in:
@ -45,7 +45,7 @@ export default class EventPost extends Post {
|
||||
/**
|
||||
* Get the name of the event icon.
|
||||
*
|
||||
* @return {String}
|
||||
* @return {string}
|
||||
*/
|
||||
icon() {
|
||||
return '';
|
||||
@ -54,8 +54,8 @@ export default class EventPost extends Post {
|
||||
/**
|
||||
* Get the description text for the event.
|
||||
*
|
||||
* @param {Object} data
|
||||
* @return {String|Object} The description to render in the DOM
|
||||
* @param {Record<string, unknown>} data
|
||||
* @return {import('mithril').Children} The description to render in the DOM
|
||||
*/
|
||||
description(data) {
|
||||
return app.translator.trans(this.descriptionKey(), data);
|
||||
@ -64,7 +64,7 @@ export default class EventPost extends Post {
|
||||
/**
|
||||
* Get the translation key for the description of the event.
|
||||
*
|
||||
* @return {String}
|
||||
* @return {string}
|
||||
*/
|
||||
descriptionKey() {
|
||||
return '';
|
||||
@ -73,7 +73,7 @@ export default class EventPost extends Post {
|
||||
/**
|
||||
* Get the translation data for the description of the event.
|
||||
*
|
||||
* @return {Object}
|
||||
* @return {Record<string, unknown>}
|
||||
*/
|
||||
descriptionData() {
|
||||
return {};
|
||||
|
Reference in New Issue
Block a user