js: Add JSDoc to exported functions and fix incorrect JSDoc formatting

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1499>
This commit is contained in:
Evan Welsh
2023-07-30 15:56:59 +03:00
committed by Florian Müllner
parent 4642a8541d
commit 64aa871a8a
56 changed files with 623 additions and 280 deletions

View File

@ -799,6 +799,9 @@ var InputSourceManager = class extends Signals.EventEmitter {
let _inputSourceManager = null;
/**
* @returns {InputSourceManager}
*/
function getInputSourceManager() {
if (_inputSourceManager == null)
_inputSourceManager = new InputSourceManager();

View File

@ -22,6 +22,7 @@ const ENABLED = 'enabled';
const APP_PERMISSIONS_TABLE = 'location';
const APP_PERMISSIONS_ID = 'location';
/** @enum {number} */
var GeoclueAccuracyLevel = {
NONE: 0,
COUNTRY: 1,

View File

@ -32,6 +32,7 @@ const MAX_VISIBLE_NETWORKS = 8;
// small optimization, to avoid using [] all the time
const NM80211Mode = NM['80211Mode'];
/** @enum {number} */
var PortalHelperResult = {
CANCELLED: 0,
COMPLETED: 1,

View File

@ -82,7 +82,11 @@ const RfkillManager = GObject.registerClass({
}
});
var _manager;
let _manager;
/**
* @returns {RfkillManager}
*/
function getRfkillManager() {
if (_manager != null)
return _manager;

View File

@ -23,8 +23,7 @@ const BoltDeviceInterface = loadInterfaceXML('org.freedesktop.bolt1.Device');
const BoltDeviceProxy = Gio.DBusProxy.makeProxyWrapper(BoltDeviceInterface);
/* */
/** @enum {string} */
var Status = {
DISCONNECTED: 'disconnected',
CONNECTING: 'connecting',
@ -34,16 +33,19 @@ var Status = {
AUTHORIZED: 'authorized',
};
/** @enum {string} */
var Policy = {
DEFAULT: 'default',
MANUAL: 'manual',
AUTO: 'auto',
};
/** @enum {string} */
var AuthCtrl = {
NONE: 'none',
};
/** @enum {string} */
var AuthMode = {
DISABLED: 'disabled',
ENABLED: 'enabled',