From c50c6ce0f77ba2461376d4a3016b7f5ffeec5161 Mon Sep 17 00:00:00 2001 From: Smit Golakiya Date: Thu, 16 Jun 2022 12:19:16 +0530 Subject: [PATCH] Updated JSDoc syntax for better type suggestions - getRedirectUri --- src/OAuth2.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/OAuth2.js b/src/OAuth2.js index 1fada805..e3e566f2 100644 --- a/src/OAuth2.js +++ b/src/OAuth2.js @@ -44,7 +44,7 @@ function createService(serviceName) { /** * Returns the redirect URI that will be used for a given script. Often this URI * needs to be entered into a configuration screen of your OAuth provider. - * @param {string} [optScriptId] The script ID of your script, which can be + * @param {string=} optScriptId The script ID of your script, which can be * found in the Script Editor UI under "File > Project properties". Defaults * to the script ID of the script being executed. * @return {string} The redirect URI. @@ -52,7 +52,7 @@ function createService(serviceName) { function getRedirectUri(optScriptId) { var scriptId = optScriptId || ScriptApp.getScriptId(); return 'https://script.google.com/macros/d/' + encodeURIComponent(scriptId) + - '/usercallback'; + '/usercallback'; } /** @@ -65,12 +65,12 @@ function getRedirectUri(optScriptId) { */ function getServiceNames(propertyStore) { var props = propertyStore.getProperties(); - return Object.keys(props).filter(function(key) { + return Object.keys(props).filter(function (key) { var parts = key.split('.'); return key.indexOf(STORAGE_PREFIX_) == 0 && parts.length > 1 && parts[1]; - }).map(function(key) { + }).map(function (key) { return key.split('.')[1]; - }).reduce(function(result, key) { + }).reduce(function (result, key) { if (result.indexOf(key) < 0) { result.push(key); }