JSDoc type fixes in `src/main/core-options.js` (#6702)
with unused `oppositeDescription` parameter removed and reordering of some other members to resolve checkJs issues in `src/main/core-options.js`, as verified by the following command: npx tsc --allowJs --checkJs --noEmit --target es5 src/main/core-options.jsmaster
parent
f207e665bc
commit
7eb4431350
|
@ -12,18 +12,20 @@ const CATEGORY_SPECIAL = "Special";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} OptionInfo
|
* @typedef {Object} OptionInfo
|
||||||
* @property {string} since - available since version
|
* @property {string} [since] - available since version
|
||||||
* @property {string} category
|
* @property {string} category
|
||||||
* @property {'int' | 'boolean' | 'choice' | 'path'} type
|
* @property {'int' | 'boolean' | 'choice' | 'path'} type
|
||||||
* @property {boolean} array - indicate it's an array of the specified type
|
* @property {boolean} [array] - indicate it's an array of the specified type
|
||||||
* @property {boolean?} deprecated - deprecated since version
|
* @property {OptionValueInfo} [default]
|
||||||
* @property {OptionRedirectInfo?} redirect - redirect deprecated option
|
* @property {OptionRangeInfo} [range] - for type int
|
||||||
* @property {string} description
|
* @property {string} description
|
||||||
* @property {string?} oppositeDescription - for `false` option
|
* @property {string} [deprecated] - deprecated since version
|
||||||
* @property {OptionValueInfo} default
|
* @property {OptionRedirectInfo} [redirect] - redirect deprecated option
|
||||||
* @property {OptionRangeInfo?} range - for type int
|
* @property {(value: any) => boolean} [exception]
|
||||||
* @property {OptionChoiceInfo?} choices - for type choice
|
* @property {OptionChoiceInfo[]} [choices] - for type choice
|
||||||
* @property {(value: any) => boolean} exception
|
* @property {string} [cliName]
|
||||||
|
* @property {string} [cliCategory]
|
||||||
|
* @property {string} [cliDescription]
|
||||||
*
|
*
|
||||||
* @typedef {number | boolean | string} OptionValue
|
* @typedef {number | boolean | string} OptionValue
|
||||||
* @typedef {OptionValue | [{ value: OptionValue[] }] | Array<{ since: string, value: OptionValue}>} OptionValueInfo
|
* @typedef {OptionValue | [{ value: OptionValue[] }] | Array<{ since: string, value: OptionValue}>} OptionValueInfo
|
||||||
|
@ -39,16 +41,13 @@ const CATEGORY_SPECIAL = "Special";
|
||||||
*
|
*
|
||||||
* @typedef {Object} OptionChoiceInfo
|
* @typedef {Object} OptionChoiceInfo
|
||||||
* @property {boolean | string} value - boolean for the option that is originally boolean type
|
* @property {boolean | string} value - boolean for the option that is originally boolean type
|
||||||
* @property {string?} description - undefined if redirect
|
* @property {string} description
|
||||||
* @property {string?} since - undefined if available since the first version of the option
|
* @property {string} [since] - undefined if available since the first version of the option
|
||||||
* @property {string?} deprecated - deprecated since version
|
* @property {string} [deprecated] - deprecated since version
|
||||||
* @property {OptionValueInfo?} redirect - redirect deprecated value
|
* @property {OptionValueInfo} [redirect] - redirect deprecated value
|
||||||
*
|
|
||||||
* @property {string?} cliName
|
|
||||||
* @property {string?} cliCategory
|
|
||||||
* @property {string?} cliDescription
|
|
||||||
*/
|
*/
|
||||||
/** @type {{ [name: string]: OptionInfo } */
|
|
||||||
|
/** @type {{ [name: string]: OptionInfo }} */
|
||||||
const options = {
|
const options = {
|
||||||
cursorOffset: {
|
cursorOffset: {
|
||||||
since: "1.4.0",
|
since: "1.4.0",
|
||||||
|
|
Loading…
Reference in New Issue