From 2603b6a2534f2108ad0686160c361a994887b157 Mon Sep 17 00:00:00 2001 From: Francis Gulotta Date: Mon, 4 Sep 2023 16:48:53 -0400 Subject: [PATCH] Add typescript types via jsdoc --- changelog.md | 1 + index.js | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/changelog.md b/changelog.md index 5dbb22b..8240076 100644 --- a/changelog.md +++ b/changelog.md @@ -11,6 +11,7 @@ Hello! After a bit of a hiatus, the [Architect team](https://github.com/architec - Added `--host` / `options.host` option for specifying a particular host - Added `--verbose|-v` / `options.verbose`, `--debug|-d` / `options.debug` logging modes, and some additional logging - Added `-h` help alias for CLI +- Added Typescript Types via JSDOC comments ### Changed diff --git a/index.js b/index.js index 4ec2f06..71e7cbf 100644 --- a/index.js +++ b/index.js @@ -21,6 +21,22 @@ var validApis = [ 'DynamoDB_20111205', 'DynamoDB_20120810' ], module.exports = dynalite +/** + * @param {Object} options - The shape is the same as SpecialType above + * @param {boolean} [options.verbose=false] - Enable verbose logging + * @param {boolean} [options.debug=false] - Enable debug logging + * @param {boolean} [options.ssl=false] - Enable SSL for the web server + * @param {string} [options.key] - SSL private key - if omitted and ssl enabled, self-signed cert will be used + * @param {string} [options.cert] - SSL certificate - if omitted and ssl enabled, self-signed cert will be used + * @param {string} [options.ca] - SSL certificate authority - if omitted and ssl enabled, self-signed cert will be used + * @param {number} [options.createTableMs=500] - Amount of time tables stay in CREATING state + * @param {number} [options.deleteTableMs=500] - Amount of time tables stay in DELETING state + * @param {number} [options.updateTableMs=500] - Amount of time tables stay in UPDATING state + * @param {number} [options.maxItemSizeKb=400] - Maximum item size + * @param {string} [options.path] - The path to use for the LevelDB store (in-memory by default) + * + * @returns {http.Server | https.Server} - The Dynalite server + */ function dynalite (options) { options = options || {} if (options.verbose) verbose = true