Skip to content

Commit

Permalink
Update JSDoc (#15)
Browse files Browse the repository at this point in the history
This may help developers, and it helps WebStorm's code analysis.  (Previously, WebStorm was warning that Chart.js's calls to acquireTests were missing a required parameter.)
  • Loading branch information
joshkel committed Nov 12, 2021
1 parent 52855a0 commit 1313753
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions src/index.js
Expand Up @@ -11,13 +11,13 @@ var charts = {};
/**
* Injects a new canvas (and div wrapper) and creates the associated Chart instance
* using the given config. Additional options allow tweaking elements generation.
* @param {object} config - Chart config.
* @param {object} options - Chart acquisition options.
* @param {object} options.canvas - Canvas attributes.
* @param {object} options.wrapper - Canvas wrapper attributes.
* @param {boolean} options.useOffscreenCanvas - use an OffscreenCanvas instead of the normal HTMLCanvasElement.
* @param {boolean} options.useShadowDOM - use shadowDom
* @param {boolean} options.persistent - If true, the chart will not be released after the spec.
* @param {object} [config] - Chart config.
* @param {object} [options] - Chart acquisition options.
* @param {object} [options.canvas] - Canvas attributes.
* @param {object} [options.wrapper] - Canvas wrapper attributes.
* @param {boolean} [options.useOffscreenCanvas] - use an OffscreenCanvas instead of the normal HTMLCanvasElement.
* @param {boolean} [options.useShadowDOM] - use shadowDom
* @param {boolean} [options.persistent] - If true, the chart will not be released after the spec.
*/
export function acquireChart(config, options) {
var chart = _acquireChart(config, options);
Expand Down
14 changes: 7 additions & 7 deletions src/utils.js
Expand Up @@ -25,13 +25,13 @@ export function readImageData(url, callback) {
/**
* Injects a new canvas (and div wrapper) and creates the associated Chart instance
* using the given config. Additional options allow tweaking elements generation.
* @param {object} config - Chart config.
* @param {object} options - Chart acquisition options.
* @param {object} options.canvas - Canvas attributes.
* @param {object} options.wrapper - Canvas wrapper attributes.
* @param {boolean} options.useOffscreenCanvas - use an OffscreenCanvas instead of the normal HTMLCanvasElement.
* @param {boolean} options.useShadowDOM - use shadowDom
* @param {boolean} options.persistent - If true, the chart will not be released after the spec.
* @param {object} [config] - Chart config.
* @param {object} [options] - Chart acquisition options.
* @param {object} [options.canvas] - Canvas attributes.
* @param {object} [options.wrapper] - Canvas wrapper attributes.
* @param {boolean} [options.useOffscreenCanvas] - use an OffscreenCanvas instead of the normal HTMLCanvasElement.
* @param {boolean} [options.useShadowDOM] - use shadowDom
* @param {boolean} [options.persistent] - If true, the chart will not be released after the spec.
*/
export function _acquireChart(config, options) {
var wrapper = document.createElement('div');
Expand Down

0 comments on commit 1313753

Please sign in to comment.