1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 01:16:52 +02:00

Don't export objects directly

This commit is contained in:
Alexander Skvortsov
2021-05-09 13:59:34 -04:00
parent 7d80b88d5c
commit 97aa569bfa
4 changed files with 12 additions and 4 deletions

View File

@@ -2,7 +2,7 @@
* The `evented` mixin provides methods allowing an object to trigger events, * The `evented` mixin provides methods allowing an object to trigger events,
* running externally registered event handlers. * running externally registered event handlers.
*/ */
export default { const evented = {
/** /**
* Arrays of registered event handlers, grouped by the event name. * Arrays of registered event handlers, grouped by the event name.
* *
@@ -79,3 +79,5 @@ export default {
} }
}, },
}; };
export default evented;

View File

@@ -11,7 +11,7 @@ import extractText from '../../common/utils/extractText';
* The `DiscussionControls` utility constructs a list of buttons for a * The `DiscussionControls` utility constructs a list of buttons for a
* discussion which perform actions on it. * discussion which perform actions on it.
*/ */
export default { const DiscussionControls = {
/** /**
* Get a list of controls for a discussion. * Get a list of controls for a discussion.
* *
@@ -259,3 +259,5 @@ export default {
}); });
}, },
}; };
export default DiscussionControls;

View File

@@ -8,7 +8,7 @@ import extractText from '../../common/utils/extractText';
* The `PostControls` utility constructs a list of buttons for a post which * The `PostControls` utility constructs a list of buttons for a post which
* perform actions on it. * perform actions on it.
*/ */
export default { const PostControls = {
/** /**
* Get a list of controls for a post. * Get a list of controls for a post.
* *
@@ -199,3 +199,5 @@ export default {
}); });
}, },
}; };
export default PostControls;

View File

@@ -8,7 +8,7 @@ import ItemList from '../../common/utils/ItemList';
* The `UserControls` utility constructs a list of buttons for a user which * The `UserControls` utility constructs a list of buttons for a user which
* perform actions on it. * perform actions on it.
*/ */
export default { const UserControls = {
/** /**
* Get a list of controls for a user. * Get a list of controls for a user.
* *
@@ -141,3 +141,5 @@ export default {
app.modal.show(EditUserModal, { user }); app.modal.show(EditUserModal, { user });
}, },
}; };
export default UserControls;