Fix: enum/readonly comment order

9246ca2779799b7a7ae0cf91eb799415ccc0ec42

Cohee <18619528+Cohee1207@users.noreply.github.com>

4 files changed, +18 -15Ignore whitespace
public/script.js+1 -1
@@ -9442,7 +9442,7 @@ function formatSwipeCounter(current, total) {
94429442/**
94439443 * Handles the swipe event.
94449444 * @param {SwipeEvent} event Event.
94459445 * @param {'left'|'right'SWIPE_DIRECTION} direction The direction to swipe.
94469446 * @param {object} params Additional parameters.
94479447 * @param {import('./scripts/constants.js').SWIPE_SOURCE} [params.source] The source of the swipe event. null, 'keyboard', 'auto_swipe', 'back' or 'delete'.
94489448 * @param {boolean} [params.repeated] Is the swipe event repeated.
public/scripts/constants.js+12 -9
@@ -1,5 +1,6 @@
11/**
22 * Common debounce timeout values to use with `debounce` calls.
3+ * @readonly
34 * @enum {number}
45 */
56export const debounce_timeout = {
@@ -68,8 +69,8 @@ export const COMETAPI_IGNORE_PATTERNS = [
6869];
6970
7071/**
71- * @enum {string}
7272 * @readonly
73+ * @enum {string}
7374 */
7475export const MEDIA_SOURCE = {
7576 API: 'api',
@@ -79,8 +80,8 @@ export const MEDIA_SOURCE = {
7980};
8081
8182/**
82- * @enum {string}
8383 * @readonly
84+ * @enum {string}
8485 */
8586export const MEDIA_DISPLAY = {
8687 LIST: 'list',
@@ -88,8 +89,8 @@ export const MEDIA_DISPLAY = {
8889};
8990
9091/**
91- * @enum {string}
9292 * @readonly
93+ * @enum {string}
9394 */
9495export const IMAGE_OVERSWIPE = {
9596 GENERATE: 'generate',
@@ -119,8 +120,8 @@ export const MEDIA_TYPE = {
119120
120121/**
121122 * Bitwise flag-style media request types.
122- * @enum {number}
123123 * @readonly
124+ * @enum {number}
124125 */
125126export const MEDIA_REQUEST_TYPE = {
126127 IMAGE: 0b001,
@@ -130,8 +131,8 @@ export const MEDIA_REQUEST_TYPE = {
130131
131132/**
132133 * Scroll behavior options when appending media to messages.
133- * @enum {string}
134134 * @readonly
135+ * @enum {string}
135136 */
136137export const SCROLL_BEHAVIOR = {
137138 NONE: 'none',
@@ -140,8 +141,8 @@ export const SCROLL_BEHAVIOR = {
140141};
141142
142143/**
143- * @enum {string}
144144 * @readonly
145+ * @enum {string}
145146 */
146147export const OVERSWIPE_BEHAVIOR = {
147148 /** The overswipe right chevron will not be displayed. */
@@ -157,7 +158,8 @@ export const OVERSWIPE_BEHAVIOR = {
157158};
158159
159160/**
160- * @type {{readonly LEFT: 'left', readonly RIGHT: 'right'}}
161+ * @readonly
162+ * @enum {string}
161163 */
162164export const SWIPE_DIRECTION = {
163165 LEFT: 'left',
@@ -165,7 +167,8 @@ export const SWIPE_DIRECTION = {
165167};
166168
167169/**
168- * @type {{readonly DELETE: 'delete', readonly KEYBOARD: 'keyboard', readonly BACK: 'back', readonly AUTO_SWIPE: 'auto_swipe'}}
170+ * @readonly
171+ * @enum {string}
169172 */
170173export const SWIPE_SOURCE = {
171174 DELETE: 'delete',
@@ -175,8 +178,8 @@ export const SWIPE_SOURCE = {
175178};
176179
177180/**
178- * @enum {string}
179181 * @readonly
182+ * @enum {string}
180183 */
181184export const SWIPE_STATE = {
182185 NONE: 'none',
public/scripts/extensions/regex/engine.js+3 -3
@@ -5,8 +5,8 @@ import { regexFromString } from '../../utils.js';
55import { lodash } from '../../../lib.js';
66
77/**
8- * @enum {number} Regex scripts types
98 * @readonly
9+ * @enum {number} Regex scripts types
1010 */
1111export const SCRIPT_TYPES = {
1212 // ORDER MATTERS: defines the regex script priority
@@ -220,8 +220,8 @@ export function getCurrentPresetName() {
220220}
221221
222222/**
223- * @enum {number} Where the regex script should be applied
224223 * @readonly
224+ * @enum {number} Where the regex script should be applied
225225 */
226226export const regex_placement = {
227227 /**
@@ -237,8 +237,8 @@ export const regex_placement = {
237237};
238238
239239/**
240- * @enum {number} How to substitute parameters in the find regex
241240 * @readonly
241+ * @enum {number} How to substitute parameters in the find regex
242242 */
243243export const substitute_find_regex = {
244244 NONE: 0,
public/scripts/reasoning.js+2 -2
@@ -51,8 +51,8 @@ const UI = {
5151
5252/**
5353 * Enum representing the type of the reasoning for a message (where it came from)
54- * @enum {string}
5554 * @readonly
55+ * @enum {string}
5656 */
5757export const ReasoningType = {
5858 Model: 'model',
@@ -186,8 +186,8 @@ export function updateReasoningUI(messageIdOrElement, { reset = false } = {}) {
186186
187187/**
188188 * Enum for representing the state of reasoning
189- * @enum {string}
190189 * @readonly
190+ * @enum {string}
191191 */
192192export const ReasoningState = {
193193 None: 'none',