Fix: enum/readonly comment order
| @@ -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. |
| @@ -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 | */ |
| 5 | export const debounce_timeout = { | 6 | export const debounce_timeout = { |
| @@ -68,8 +69,8 @@ export const COMETAPI_IGNORE_PATTERNS = [ | |||
| 68 | ]; | 69 | ]; |
| 69 | 70 | ||
| 70 | /** | 71 | /** |
| 71 | * @enum {string} | ||
| 72 | * @readonly | 72 | * @readonly |
| 73 | * @enum {string} | ||
| 73 | */ | 74 | */ |
| 74 | export const MEDIA_SOURCE = { | 75 | export const MEDIA_SOURCE = { |
| 75 | API: 'api', | 76 | API: 'api', |
| @@ -79,8 +80,8 @@ export const MEDIA_SOURCE = { | |||
| 79 | }; | 80 | }; |
| 80 | 81 | ||
| 81 | /** | 82 | /** |
| 82 | * @enum {string} | ||
| 83 | * @readonly | 83 | * @readonly |
| 84 | * @enum {string} | ||
| 84 | */ | 85 | */ |
| 85 | export const MEDIA_DISPLAY = { | 86 | export const MEDIA_DISPLAY = { |
| 86 | LIST: 'list', | 87 | LIST: 'list', |
| @@ -88,8 +89,8 @@ export const MEDIA_DISPLAY = { | |||
| 88 | }; | 89 | }; |
| 89 | 90 | ||
| 90 | /** | 91 | /** |
| 91 | * @enum {string} | ||
| 92 | * @readonly | 92 | * @readonly |
| 93 | * @enum {string} | ||
| 93 | */ | 94 | */ |
| 94 | export const IMAGE_OVERSWIPE = { | 95 | export const IMAGE_OVERSWIPE = { |
| 95 | GENERATE: 'generate', | 96 | GENERATE: 'generate', |
| @@ -119,8 +120,8 @@ export const MEDIA_TYPE = { | |||
| 119 | 120 | ||
| 120 | /** | 121 | /** |
| 121 | * Bitwise flag-style media request types. | 122 | * Bitwise flag-style media request types. |
| 122 | * @enum {number} | ||
| 123 | * @readonly | 123 | * @readonly |
| 124 | * @enum {number} | ||
| 124 | */ | 125 | */ |
| 125 | export const MEDIA_REQUEST_TYPE = { | 126 | export const MEDIA_REQUEST_TYPE = { |
| 126 | IMAGE: 0b001, | 127 | IMAGE: 0b001, |
| @@ -130,8 +131,8 @@ export const MEDIA_REQUEST_TYPE = { | |||
| 130 | 131 | ||
| 131 | /** | 132 | /** |
| 132 | * Scroll behavior options when appending media to messages. | 133 | * Scroll behavior options when appending media to messages. |
| 133 | * @enum {string} | ||
| 134 | * @readonly | 134 | * @readonly |
| 135 | * @enum {string} | ||
| 135 | */ | 136 | */ |
| 136 | export const SCROLL_BEHAVIOR = { | 137 | export const SCROLL_BEHAVIOR = { |
| 137 | NONE: 'none', | 138 | NONE: 'none', |
| @@ -140,8 +141,8 @@ export const SCROLL_BEHAVIOR = { | |||
| 140 | }; | 141 | }; |
| 141 | 142 | ||
| 142 | /** | 143 | /** |
| 143 | * @enum {string} | ||
| 144 | * @readonly | 144 | * @readonly |
| 145 | * @enum {string} | ||
| 145 | */ | 146 | */ |
| 146 | export const OVERSWIPE_BEHAVIOR = { | 147 | export 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 | }; |
| 158 | 159 | ||
| 159 | /** | 160 | /** |
| 160 | * @type {{readonly LEFT: 'left', readonly RIGHT: 'right'}} | 161 | * @readonly |
| 162 | * @enum {string} | ||
| 161 | */ | 163 | */ |
| 162 | export const SWIPE_DIRECTION = { | 164 | export const SWIPE_DIRECTION = { |
| 163 | LEFT: 'left', | 165 | LEFT: 'left', |
| @@ -165,7 +167,8 @@ export const SWIPE_DIRECTION = { | |||
| 165 | }; | 167 | }; |
| 166 | 168 | ||
| 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 | */ |
| 170 | export const SWIPE_SOURCE = { | 173 | export const SWIPE_SOURCE = { |
| 171 | DELETE: 'delete', | 174 | DELETE: 'delete', |
| @@ -175,8 +178,8 @@ export const SWIPE_SOURCE = { | |||
| 175 | }; | 178 | }; |
| 176 | 179 | ||
| 177 | /** | 180 | /** |
| 178 | * @enum {string} | ||
| 179 | * @readonly | 181 | * @readonly |
| 182 | * @enum {string} | ||
| 180 | */ | 183 | */ |
| 181 | export const SWIPE_STATE = { | 184 | export const SWIPE_STATE = { |
| 182 | NONE: 'none', | 185 | NONE: 'none', |
| @@ -5,8 +5,8 @@ import { regexFromString } from '../../utils.js'; | |||
| 5 | import { lodash } from '../../../lib.js'; | 5 | import { lodash } from '../../../lib.js'; |
| 6 | 6 | ||
| 7 | /** | 7 | /** |
| 8 | * @enum {number} Regex scripts types | ||
| 9 | * @readonly | 8 | * @readonly |
| 9 | * @enum {number} Regex scripts types | ||
| 10 | */ | 10 | */ |
| 11 | export const SCRIPT_TYPES = { | 11 | export const SCRIPT_TYPES = { |
| 12 | // ORDER MATTERS: defines the regex script priority | 12 | // ORDER MATTERS: defines the regex script priority |
| @@ -220,8 +220,8 @@ export function getCurrentPresetName() { | |||
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | /** | 222 | /** |
| 223 | * @enum {number} Where the regex script should be applied | ||
| 224 | * @readonly | 223 | * @readonly |
| 224 | * @enum {number} Where the regex script should be applied | ||
| 225 | */ | 225 | */ |
| 226 | export const regex_placement = { | 226 | export const regex_placement = { |
| 227 | /** | 227 | /** |
| @@ -237,8 +237,8 @@ export const regex_placement = { | |||
| 237 | }; | 237 | }; |
| 238 | 238 | ||
| 239 | /** | 239 | /** |
| 240 | * @enum {number} How to substitute parameters in the find regex | ||
| 241 | * @readonly | 240 | * @readonly |
| 241 | * @enum {number} How to substitute parameters in the find regex | ||
| 242 | */ | 242 | */ |
| 243 | export const substitute_find_regex = { | 243 | export const substitute_find_regex = { |
| 244 | NONE: 0, | 244 | NONE: 0, |
| @@ -51,8 +51,8 @@ const UI = { | |||
| 51 | 51 | ||
| 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 | * @readonly | 54 | * @readonly |
| 55 | * @enum {string} | ||
| 56 | */ | 56 | */ |
| 57 | export const ReasoningType = { | 57 | export const ReasoningType = { |
| 58 | Model: 'model', | 58 | Model: 'model', |
| @@ -186,8 +186,8 @@ export function updateReasoningUI(messageIdOrElement, { reset = false } = {}) { | |||
| 186 | 186 | ||
| 187 | /** | 187 | /** |
| 188 | * Enum for representing the state of reasoning | 188 | * Enum for representing the state of reasoning |
| 189 | * @enum {string} | ||
| 190 | * @readonly | 189 | * @readonly |
| 190 | * @enum {string} | ||
| 191 | */ | 191 | */ |
| 192 | export const ReasoningState = { | 192 | export const ReasoningState = { |
| 193 | None: 'none', | 193 | None: 'none', |