diff --git a/cli/tauri.js/api/dialog.js b/cli/tauri.js/api/dialog.js index 5dbfc2b67..a06243740 100644 --- a/cli/tauri.js/api/dialog.js +++ b/cli/tauri.js/api/dialog.js @@ -3,7 +3,7 @@ import tauri from './tauri' /** * @name openDialog * @description Open a file/directory selection dialog - * @param {String} [options] + * @param {Object} [options] * @param {String} [options.filter] * @param {String} [options.defaultPath] * @param {Boolean} [options.multiple=false] @@ -17,7 +17,7 @@ function open (options = {}) { /** * @name save * @description Open a file/directory save dialog - * @param {String} [options] + * @param {Object} [options] * @param {String} [options.filter] * @param {String} [options.defaultPath] * @returns {Promise} promise resolving to the select path diff --git a/cli/tauri.js/api/event.js b/cli/tauri.js/api/event.js index d6715d473..18fd314c7 100644 --- a/cli/tauri.js/api/event.js +++ b/cli/tauri.js/api/event.js @@ -2,17 +2,17 @@ import tauri from './tauri' /** * The event handler callback - * @callback eventCallback - * @param {object} event - * @param {string} event.type + * @callback EventCallback + * @param {Object} event + * @param {String} event.type * @param {any} [event.payload] */ /** * listen to an event from the backend * - * @param {string} event the event name - * @param {eventCallback} handler the event handler callback + * @param {String} event the event name + * @param {EventCallback} handler the event handler callback */ function listen (event, handler) { tauri.listen(event, handler) @@ -21,8 +21,8 @@ function listen (event, handler) { /** * emits an event to the backend * - * @param {string} event the event name - * @param {string} [payload] the event payload + * @param {String} event the event name + * @param {String} [payload] the event payload */ function emit (event, payload) { tauri.emit(event, payload) diff --git a/cli/tauri.js/api/fs/index.js b/cli/tauri.js/api/fs/index.js index 2eb16242c..2f911b426 100644 --- a/cli/tauri.js/api/fs/index.js +++ b/cli/tauri.js/api/fs/index.js @@ -4,8 +4,8 @@ import { Dir } from './dir' /** * reads a file as text * - * @param {string} filePath path to the file - * @param {object} [options] configuration object + * @param {String} filePath path to the file + * @param {Object} [options] configuration object * @param {BaseDirectory} [options.dir] base directory * @return {Promise} */ @@ -16,8 +16,8 @@ function readTextFile (filePath, options = {}) { /** * reads a file as binary * - * @param {string} filePath path to the file - * @param {object} [options] configuration object + * @param {String} filePath path to the file + * @param {Object} [options] configuration object * @param {BaseDirectory} [options.dir] base directory * @return {Promise} */ @@ -28,10 +28,10 @@ function readBinaryFile (filePath, options = {}) { /** * writes a text file * - * @param {object} file - * @param {string} file.path path of the file - * @param {string} file.contents contents of the file - * @param {object} [options] configuration object + * @param {Object} file + * @param {String} file.path path of the file + * @param {String} file.contents contents of the file + * @param {Object} [options] configuration object * @param {BaseDirectory} [options.dir] base directory * @return {Promise} */ @@ -40,18 +40,18 @@ function writeFile (file, options = {}) { } /** - * @typedef {object} FileEntry - * @property {string} path - * @property {boolean} is_dir - * @property {string} name + * @typedef {Object} FileEntry + * @property {String} path + * @property {Boolean} is_dir + * @property {String} name */ /** * list directory files * - * @param {string} dir path to the directory to read - * @param {object} [options] configuration object - * @param {boolean} [options.recursive] whether to list dirs recursively or not + * @param {String} dir path to the directory to read + * @param {Object} [options] configuration object + * @param {Boolean} [options.recursive] whether to list dirs recursively or not * @param {BaseDirectory} [options.dir] base directory * @return {Promise} */ @@ -64,9 +64,9 @@ function readDir (dir, options = {}) { * If one of the path's parent components doesn't exist * and the `recursive` option isn't set to true, it will be rejected * - * @param {string} dir path to the directory to create - * @param {object} [options] configuration object - * @param {boolean} [options.recursive] whether to create the directory's parent components or not + * @param {String} dir path to the directory to create + * @param {Object} [options] configuration object + * @param {Boolean} [options.recursive] whether to create the directory's parent components or not * @param {BaseDirectory} [options.dir] base directory * @return {Promise} */ @@ -78,9 +78,9 @@ function createDir (dir, options = {}) { * Removes a directory * If the directory is not empty and the `recursive` option isn't set to true, it will be rejected * - * @param {string} dir path to the directory to remove - * @param {object} [options] configuration object - * @param {boolean} [options.recursive] whether to remove all of the directory's content or not + * @param {String} dir path to the directory to remove + * @param {Object} [options] configuration object + * @param {Boolean} [options.recursive] whether to remove all of the directory's content or not * @param {BaseDirectory} [options.dir] base directory * @return {Promise} */ @@ -104,8 +104,8 @@ function copyFile (source, destination, options = {}) { /** * Removes a file * - * @param {string} file path to the file to remove - * @param {object} [options] configuration object + * @param {String} file path to the file to remove + * @param {Object} [options] configuration object * @param {BaseDirectory} [options.dir] base directory * @return {Promise} */ @@ -116,9 +116,9 @@ function removeFile (file, options = {}) { /** * Renames a file * - * @param {string} oldPath - * @param {string} newPath - * @param {object} [options] configuration object + * @param {String} oldPath + * @param {String} newPath + * @param {Object} [options] configuration object * @param {BaseDirectory} [options.dir] base directory * @return {Promise} */ diff --git a/cli/tauri.js/api/process.js b/cli/tauri.js/api/process.js index bf1355d3c..dcab4df57 100644 --- a/cli/tauri.js/api/process.js +++ b/cli/tauri.js/api/process.js @@ -3,9 +3,9 @@ import tauri from './tauri' /** * spawns a process * - * @param {string} command the name of the cmd to execute e.g. 'mkdir' or 'node' - * @param {(string[]|string)} [args] command args - * @return {Promise} promise resolving to the stdout text + * @param {String} command the name of the cmd to execute e.g. 'mkdir' or 'node' + * @param {(String[]|String)} [args] command args + * @return {Promise} promise resolving to the stdout text */ function execute (command, args) { return tauri.execute(command, args) diff --git a/cli/tauri.js/api/window.js b/cli/tauri.js/api/window.js index a1343227a..094ad67ae 100644 --- a/cli/tauri.js/api/window.js +++ b/cli/tauri.js/api/window.js @@ -3,7 +3,7 @@ import tauri from './tauri' /** * sets the window title * - * @param {string} title the new title + * @param {String} title the new title */ function setTitle (title) { tauri.setTitle(title) @@ -12,7 +12,7 @@ function setTitle (title) { /** * opens an URL on the user default browser * - * @param {string} url the URL to open + * @param {String} url the URL to open */ function open (url) { tauri.open(url)