Fix redundant jsdoc in chrome (#48190)

Previously the lint rule was crashing and not reporting the errors:

- `@export` is redundant with `export`
- `@requires`, as documented in jsdoc.app, is redundant with dynamic or
  normal imports. The usage here seems to be non-standard, so I'm not
  sure what the best fix is.
- `@param` should not have types since those are already specified in
  Typescript.
This commit is contained in:
Nathan Shively-Sanders 2020-09-25 16:13:55 -07:00 committed by GitHub
parent eb702e4e39
commit cfdad97cb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2553,7 +2553,6 @@ declare namespace chrome.enterprise.platformKeys {
declare namespace chrome.enterprise.deviceAttributes {
/**
* @description Fetches the value of the device identifier of the directory API, that is generated by the server and identifies the cloud record of the device for querying in the cloud directory API.
* @export
* @param callback Called with the device identifier of the directory API when received.
* The callback parameter should be a function that looks like this:
* function(string deviceId) {...};
@ -5452,7 +5451,6 @@ declare namespace chrome.serial {
/**
* @since Chrome 33.
* @description Returns information about available serial devices on the system. The list is regenerated each time this method is called.
* @export
* @param callback Called with the list of DeviceInfo objects.
* The callback parameter should be a function that looks like this:
* function(array of object ports) {...};
@ -5462,7 +5460,6 @@ declare namespace chrome.serial {
/**
* @since Chrome 33.
* @description Connects to a given serial port.
* @export
* @param path The system path of the serial port to open.
* @param options Port configuration options.
* @param callback Called when the connection has been opened.
@ -5474,7 +5471,6 @@ declare namespace chrome.serial {
/**
* @since Chrome 33.
* @description Update the option settings on an open serial port connection.
* @export
* @param connectionId The id of the opened connection.
* @param options Port configuration options.
* @param callback Called when the configuation has completed.
@ -5486,7 +5482,6 @@ declare namespace chrome.serial {
/**
* @since Chrome 33.
* @description Disconnects from a serial port.
* @export
* @param connectionId The id of the opened connection.
* @param callback Called when the connection has been closed.
* The callback parameter should be a function that looks like this:
@ -5497,7 +5492,6 @@ declare namespace chrome.serial {
/**
* @since Chrome 33.
* @description Pauses or unpauses an open connection.
* @export
* @param connectionId The id of the opened connection.
* @param paused Flag to indicate whether to pause or unpause.
* @param callback Called when the connection has been successfully paused or unpaused.
@ -5509,7 +5503,6 @@ declare namespace chrome.serial {
/**
* @since Chrome 33.
* @description Retrieves the state of a given connection.
* @export
* @param callback Called with connection state information when available.
* The callback parameter should be a function that looks like this:
* function( ConnectionInfo connectionInfo) {...};
@ -5519,7 +5512,6 @@ declare namespace chrome.serial {
/**
* @since Chrome 33.
* @description Retrieves the list of currently opened serial port connections owned by the application.
* @export
* @param callback Called with the list of connections when available.
* The callback parameter should be a function that looks like this:
* function(array of ConnectionInfo connectionInfos) {...};
@ -5529,7 +5521,6 @@ declare namespace chrome.serial {
/**
* @since Chrome 33.
* @description Writes data to the given connection.
* @export
* @param connectionId The id of the connection.
* @param data The data to send.
* @param callback Called when the operation has completed.
@ -5540,7 +5531,6 @@ declare namespace chrome.serial {
/**
* @description Flushes all bytes in the given connection's input and output buffers.
* @export
* @param connectionId The id of the connection.
* @param callback
* The callback parameter should be a function that looks like this:
@ -5550,7 +5540,6 @@ declare namespace chrome.serial {
/**
* @description Retrieves the state of control signals on a given connection.
* @export
* @param connectionId The id of the connection.
* @param callback Called when the control signals are available.
* The callback parameter should be a function that looks like this:
@ -5560,7 +5549,6 @@ declare namespace chrome.serial {
/**
* @description Sets the state of control signals on a given connection.
* @export
* @param connectionId The id of the connection.
* @param signals The set of signal changes to send to the device:
* boolean: (optional) dtr - DTR (Data Terminal Ready).
@ -5574,7 +5562,6 @@ declare namespace chrome.serial {
/**
* @since Chrome 45.
* @description Suspends character transmission on a given connection and places the transmission line in a break state until the clearBreak is called.
* @export
* @param connectionId The id of the connection.
* @param callback
* The callback parameter should be a function that looks like this:
@ -5585,7 +5572,6 @@ declare namespace chrome.serial {
/**
* @since Chrome 45.
* @description Restore character transmission on a given connection and place the transmission line in a nonbreak state.
* @export
* @param connectionId The id of the connection.
* @param callback
* The callback parameter should be a function that looks like this:
@ -5608,7 +5594,6 @@ declare namespace chrome.serial.onReceive {
/**
* @since Chrome 33.
* @description Event raised when data has been read from the connection.
* @export
* @param callback
* The callback parameter should be a function that looks like this:
* function(OnReceiveInfo info) {...};
@ -5650,7 +5635,6 @@ declare namespace chrome.serial.onReceiveError {
* @since Chrome 33.
* @description Event raised when an error occurred while the runtime was waiting for data on the serial port.
* Once this event is raised, the connection may be set to paused. A "timeout" error does not pause the connection.
* @export
* @param callback
* The callback parameter should be a function that looks like this:
* function(OnReceiveErrorInfo info) {...};
@ -6718,7 +6702,7 @@ declare namespace chrome.system.display {
*/
export interface DisplayPropertiesInfo {
/**
* @requires(CrOS) Chrome OS only.
* requires(CrOS) Chrome OS only.
* @description
* If set to true, changes the display mode to unified desktop.
* If set to false, unified desktop mode will be disabled.
@ -6731,7 +6715,7 @@ declare namespace chrome.system.display {
isUnified?: boolean;
/**
* @requires(CrOS) Chrome OS only.
* requires(CrOS) Chrome OS only.
* @deprecated Deprecated since Chrome 68. Use ´setMirrorMode´
* @see setMirrorMode
* @description
@ -6819,7 +6803,7 @@ declare namespace chrome.system.display {
/** The user-friendly name (e.g. 'HP LCD monitor'). */
name: string;
/**
* @requires(CrOS Kiosk app) Only available in Chrome OS Kiosk apps
* requires(CrOS Kiosk app) Only available in Chrome OS Kiosk apps
*/
edid?: {
/**
@ -6836,7 +6820,7 @@ declare namespace chrome.system.display {
yearOfManufacture?: string;
}
/**
* @requires(CrOS) Only working properly on Chrome OS.
* requires(CrOS) Only working properly on Chrome OS.
* Identifier of the display that is being mirrored on the display unit.
* If mirroring is not in progress, set to an empty string
* Currently exposed only on ChromeOS.
@ -6844,7 +6828,7 @@ declare namespace chrome.system.display {
*/
mirroringSourceId: string;
/**
* @requires(CrOS) Only available on Chrome OS.
* requires(CrOS) Only available on Chrome OS.
* Identifiers of the displays to which the source display is being mirrored.
* Empty if no displays are being mirrored. This will be set to the same value
* for all displays.
@ -6870,7 +6854,7 @@ declare namespace chrome.system.display {
/** The usable work area of the display within the display bounds. The work area excludes areas of the display reserved for OS, for example taskbar and launcher. */
workArea: Bounds;
/**
* @requires(CrOS) Only available on Chrome OS.
* requires(CrOS) Only available on Chrome OS.
* The list of available display modes.
* The current mode will have isSelected=true.
* Only available on Chrome OS.
@ -6921,28 +6905,27 @@ declare namespace chrome.system.display {
export function getInfo(flags: DisplayInfoFlags, callback: (info: DisplayInfo[]) => void): void;
/**
* @requires(CrOS Kiosk apps | WebUI) This is only available to Chrome OS Kiosk apps and Web UI.
* requires(CrOS Kiosk apps | WebUI) This is only available to Chrome OS Kiosk apps and Web UI.
* @description Requests the layout info for all displays.
* @since Chrome 53
* @export
* @param callback The callback to invoke with the results.
*/
export function getDisplayLayout(callback: (layouts: DisplayLayout[]) => void): void;
/**
* @requires(CrOS Kiosk apps | WebUI) This is only available to Chrome OS Kiosk apps and Web UI.
* requires(CrOS Kiosk apps | WebUI) This is only available to Chrome OS Kiosk apps and Web UI.
* @description
* Updates the properties for the display specified by **id**,
* according to the information provided in **info**.
* On failure, runtime.lastError will be set.
* @param {string} id The display's unique identifier.
* @param {DisplayPropertiesInfo} info The information about display properties that should be changed. A property will be changed only if a new value for it is specified in |info|.
* @param {() => void} [callback] Empty function called when the function finishes. To find out whether the function succeeded, runtime.lastError should be queried.
* @param id The display's unique identifier.
* @param info The information about display properties that should be changed. A property will be changed only if a new value for it is specified in |info|.
* @param [callback] Empty function called when the function finishes. To find out whether the function succeeded, runtime.lastError should be queried.
*/
export function setDisplayProperties(id: string, info: DisplayPropertiesInfo, callback?: () => void): void;
/**
* @requires(CrOS Kiosk apps | WebUI) This is only available to Chrome OS Kiosk apps and Web UI.
* requires(CrOS Kiosk apps | WebUI) This is only available to Chrome OS Kiosk apps and Web UI.
* @description
* Set the layout for all displays.
* Any display not included will use the default layout.
@ -6955,13 +6938,13 @@ declare namespace chrome.system.display {
export function setDisplayLayout(layouts: DisplayLayout[], callback?: () => void): void;
/**
* @requires(CrOS Kiosk apps | WebUI) This is only available to Chrome OS Kiosk apps and Web UI.
* requires(CrOS Kiosk apps | WebUI) This is only available to Chrome OS Kiosk apps and Web UI.
* @description
* Enables/disables the unified desktop feature.
* Note that this simply enables the feature, but will not change the actual desktop mode.
* (That is, if the desktop is in mirror mode, it will stay in mirror mode)
* @since Chrome 46
* @param {boolean} enabled True if unified desktop should be enabled.
* @param enabled True if unified desktop should be enabled.
*/
export function enableUnifiedDesktop(enabled: boolean): void;
/**
@ -7037,7 +7020,7 @@ declare namespace chrome.system.display {
export function clearTouchCalibration(id: string): void;
/**
* @requires(CrOS Kiosk app) Chrome OS Kiosk apps only
* requires(CrOS Kiosk app) Chrome OS Kiosk apps only
* @since Chrome 65.
* @description
* Sets the display mode to the specified mirror mode.