[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
This commit is contained in:
Victor Woeltjen 2016-02-09 12:30:53 -08:00
parent 6880c82719
commit 437b235361

View File

@ -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;