Fix: enum/readonly comment order

9246ca2779799b7a7ae0cf91eb799415ccc0ec42

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

4 files changed, +18 -15Showing whitespace changes
public/script.js+1 -1
@@ -9442,7 +9442,7 @@ function formatSwipeCounter(current, total) {
9442/**9442/**
9443 * Handles the swipe event.9443 * Handles the swipe event.
9444 * @param {SwipeEvent} event Event.9444 * @param {SwipeEvent} event Event.
9445 * @param {'left'|'right'} direction The direction to swipe.9445 * @param {SWIPE_DIRECTION} direction The direction to swipe.
9446 * @param {object} params Additional parameters.9446 * @param {object} params Additional parameters.
9447 * @param {import('./scripts/constants.js').SWIPE_SOURCE} [params.source] The source of the swipe event. null, 'keyboard', 'auto_swipe', 'back' or 'delete'.9447 * @param {import('./scripts/constants.js').SWIPE_SOURCE} [params.source] The source of the swipe event. null, 'keyboard', 'auto_swipe', 'back' or 'delete'.
9448 * @param {boolean} [params.repeated] Is the swipe event repeated.9448 * @param {boolean} [params.repeated] Is the swipe event repeated.
public/scripts/constants.js+12 -9
@@ -1,5 +1,6 @@
1/**1/**
2 * Common debounce timeout values to use with `debounce` calls.2 * Common debounce timeout values to use with `debounce` calls.
3 * @readonly
3 * @enum {number}4 * @enum {number}
4 */5 */
5export const debounce_timeout = {6export const debounce_timeout = {
@@ -68,8 +69,8 @@ export const COMETAPI_IGNORE_PATTERNS = [
68];69];
6970
70/**71/**
71 * @enum {string}
72 * @readonly72 * @readonly
73 * @enum {string}
73 */74 */
74export const MEDIA_SOURCE = {75export const MEDIA_SOURCE = {
75 API: 'api',76 API: 'api',
@@ -79,8 +80,8 @@ export const MEDIA_SOURCE = {
79};80};
8081
81/**82/**
82 * @enum {string}
83 * @readonly83 * @readonly
84 * @enum {string}
84 */85 */
85export const MEDIA_DISPLAY = {86export const MEDIA_DISPLAY = {
86 LIST: 'list',87 LIST: 'list',
@@ -88,8 +89,8 @@ export const MEDIA_DISPLAY = {
88};89};
8990
90/**91/**
91 * @enum {string}
92 * @readonly92 * @readonly
93 * @enum {string}
93 */94 */
94export const IMAGE_OVERSWIPE = {95export const IMAGE_OVERSWIPE = {
95 GENERATE: 'generate',96 GENERATE: 'generate',
@@ -119,8 +120,8 @@ export const MEDIA_TYPE = {
119120
120/**121/**
121 * Bitwise flag-style media request types.122 * Bitwise flag-style media request types.
122 * @enum {number}
123 * @readonly123 * @readonly
124 * @enum {number}
124 */125 */
125export const MEDIA_REQUEST_TYPE = {126export const MEDIA_REQUEST_TYPE = {
126 IMAGE: 0b001,127 IMAGE: 0b001,
@@ -130,8 +131,8 @@ export const MEDIA_REQUEST_TYPE = {
130131
131/**132/**
132 * Scroll behavior options when appending media to messages.133 * Scroll behavior options when appending media to messages.
133 * @enum {string}
134 * @readonly134 * @readonly
135 * @enum {string}
135 */136 */
136export const SCROLL_BEHAVIOR = {137export const SCROLL_BEHAVIOR = {
137 NONE: 'none',138 NONE: 'none',
@@ -140,8 +141,8 @@ export const SCROLL_BEHAVIOR = {
140};141};
141142
142/**143/**
143 * @enum {string}
144 * @readonly144 * @readonly
145 * @enum {string}
145 */146 */
146export const OVERSWIPE_BEHAVIOR = {147export const OVERSWIPE_BEHAVIOR = {
147 /** The overswipe right chevron will not be displayed. */148 /** The overswipe right chevron will not be displayed. */
@@ -157,7 +158,8 @@ export const OVERSWIPE_BEHAVIOR = {
157};158};
158159
159/**160/**
160 * @type {{readonly LEFT: 'left', readonly RIGHT: 'right'}}161 * @readonly
162 * @enum {string}
161 */163 */
162export const SWIPE_DIRECTION = {164export const SWIPE_DIRECTION = {
163 LEFT: 'left',165 LEFT: 'left',
@@ -165,7 +167,8 @@ export const SWIPE_DIRECTION = {
165};167};
166168
167/**169/**
168 * @type {{readonly DELETE: 'delete', readonly KEYBOARD: 'keyboard', readonly BACK: 'back', readonly AUTO_SWIPE: 'auto_swipe'}}170 * @readonly
171 * @enum {string}
169 */172 */
170export const SWIPE_SOURCE = {173export const SWIPE_SOURCE = {
171 DELETE: 'delete',174 DELETE: 'delete',
@@ -175,8 +178,8 @@ export const SWIPE_SOURCE = {
175};178};
176179
177/**180/**
178 * @enum {string}
179 * @readonly181 * @readonly
182 * @enum {string}
180 */183 */
181export const SWIPE_STATE = {184export const SWIPE_STATE = {
182 NONE: 'none',185 NONE: 'none',
public/scripts/extensions/regex/engine.js+3 -3
@@ -5,8 +5,8 @@ import { regexFromString } from '../../utils.js';
5import { lodash } from '../../../lib.js';5import { lodash } from '../../../lib.js';
66
7/**7/**
8 * @enum {number} Regex scripts types
9 * @readonly8 * @readonly
9 * @enum {number} Regex scripts types
10 */10 */
11export const SCRIPT_TYPES = {11export const SCRIPT_TYPES = {
12 // ORDER MATTERS: defines the regex script priority12 // ORDER MATTERS: defines the regex script priority
@@ -220,8 +220,8 @@ export function getCurrentPresetName() {
220}220}
221221
222/**222/**
223 * @enum {number} Where the regex script should be applied
224 * @readonly223 * @readonly
224 * @enum {number} Where the regex script should be applied
225 */225 */
226export const regex_placement = {226export const regex_placement = {
227 /**227 /**
@@ -237,8 +237,8 @@ export const regex_placement = {
237};237};
238238
239/**239/**
240 * @enum {number} How to substitute parameters in the find regex
241 * @readonly240 * @readonly
241 * @enum {number} How to substitute parameters in the find regex
242 */242 */
243export const substitute_find_regex = {243export const substitute_find_regex = {
244 NONE: 0,244 NONE: 0,
public/scripts/reasoning.js+2 -2
@@ -51,8 +51,8 @@ const UI = {
5151
52/**52/**
53 * Enum representing the type of the reasoning for a message (where it came from)53 * Enum representing the type of the reasoning for a message (where it came from)
54 * @enum {string}
55 * @readonly54 * @readonly
55 * @enum {string}
56 */56 */
57export const ReasoningType = {57export const ReasoningType = {
58 Model: 'model',58 Model: 'model',
@@ -186,8 +186,8 @@ export function updateReasoningUI(messageIdOrElement, { reset = false } = {}) {
186186
187/**187/**
188 * Enum for representing the state of reasoning188 * Enum for representing the state of reasoning
189 * @enum {string}
190 * @readonly189 * @readonly
190 * @enum {string}
191 */191 */
192export const ReasoningState = {192export const ReasoningState = {
193 None: 'none',193 None: 'none',