From 437b235361535398621e1ffa23e11ad126318268 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Tue, 9 Feb 2016 12:30:53 -0800 Subject: [PATCH] [CSV Export] Update JSDoc Fill in complete JSDoc and separate out callback documentation per code review: https://github.com/nasa/openmctweb/pull/652/files#r52263213 https://github.com/nasa/openmctweb/pull/652/files#r52264447 --- platform/exporters/ExportService.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/platform/exporters/ExportService.js b/platform/exporters/ExportService.js index c9f60c575c..1493e8a8a6 100644 --- a/platform/exporters/ExportService.js +++ b/platform/exporters/ExportService.js @@ -21,13 +21,28 @@ *****************************************************************************/ /*global define,Blob*/ +/** + * @namespace platform/exporters + */ define(['csv'], function (CSV) { /** - * The `exportService` provides - * @param {function} saveAs a function that takes a Blob and a file name - * and triggers a file download as a consequence + * Callback used to initiate saving files from the export service; + * typical implementation is + * [FileSaver.js](https://github.com/eligrey/FileSaver.js/). + * @callback platform/exporters.ExportService~saveAs + * @param {Blob} blob the contents of the file to export + * @param {string} filename the name of the file to export + */ + + + /** + * The `exportService` provides a means to initiate downloads of + * structured data in the CSV format. + * @param {platform/exporters.ExportService~saveAs} saveAs function + * used to initiate saving files * @constructor + * @memberof platform/exporters */ function ExportService(saveAs) { this.saveAs = saveAs;